This tutorial uses Visual Studio Code for code writing and compilation.
It is recommended that you install the official C# Dev Kit extension from Microsoft. This will ensure that you have what you need to program with YMConnect including the .Net core SDK.
Open View -> Command Pallete and select .NET: New Project.
Select "Console App"
Name the app "HelloYMConnect"
Select a location for the project.
Move the YMConnect_CS.dll and the libYMConnect.so to the project folder.
Expand "HelloYMConnect" in the Solution Explorer. This is located under the file explorer view on the left side panel toward the bottom.
Click on the HelloYMConnect project(the line highlighted in the above graphic).
To add the reference to YMConnect, Add the following right underneath the "PropertyGroup" in HelloYMConnect.csproj. This ensures that the shared object is copied to the output directory as well as the reference dll.
<!--
PropertyGroup tags
-->
<ItemGroup>
<Reference Include="YMConnect_CS">
<HintPath>YMConnect_CS.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Update="libYMConnect.so">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
using YMConnect;
//192.168.1.31 is the default IP address for single-arm systems in North and South America.
//This should be changed if your controller has a different address.
MotomanController c = MotomanController.OpenConnection("192.168.1.31", out StatusInfo status);
status = c.ControlCommands.DisplayStringToPendant("Hello YMConnect!");
Console.WriteLine(status);
Code (0): OK
and the pendant will display the following