This library is heavily based on @BrianPeek’s excellent work https://github.com/BrianPeek/legoev3.
Rewrite of the Lego.Ev3 library to support .NET Core
Source code is in the /Lego.Mindstorms directory. A sample console project is in the /Lego.Mindstorms.Client directory.
Clone this repository in an empty directory:
git clone https://github.com/seesharprun/Lego-Mindstorms .
Connect your brick to your computer using a USB cable. For the test client, connect a large or small motor to Port A.
Use the .NET CLI to execute the test project:
dotnet run --project Lego.Mindstorms.Client/Lego.Mindstorms.Client.csproj
using (var communication = new UsbCommunication())
using (var client = new Lego.Mindstorms.MindstormsClient<UsbCommunication>(communication))
{
await client.ConnectAsync();
await client.TurnMotorAtPowerForTimeAsync(OutputPort.A, 50, 3000u, false);
await client.PlayToneAsync(50, 5000, 500);
}
Version 1.x of the library has been released to NuGet. This is a 1-to-1 port of the BrianPeek/legoev3 project to .NET Standard with minimal code changes.
https://www.nuget.org/packages/Lego.Mindstorms/
Lego.Ev3.Desktop
to Lego.Mindstorms