//Build our device factory:
var DeviceFactory = GoPiGo.DeviceFactory.Build;
//Build motor controller
var motorController = GoPiGo.MotorController();
//GoPiGoCommand.Stop:
motorController.Stop();
//GoPiGoCommand.Backward:
motorController.MoveBackward();
//GoPiGoCommand.Forward:
motorController.MoveForward();
//GoPiGoCommand.Left:
motorController.MoveLeft();
//GoPiGoCommand.Right:
motorController.MoveRight();
//GoPiGoCommand.RotateLeft:
motorController.RotateLeft();
//GoPiGoCommand.RotateRight:
motorController.RotateRight();
//GoPiGoCommand.SetLeftMotorSpeed:
motorController.SetLeftMotorSpeed(value);
//GoPiGoCommand.SetRightMotorSpeed:
motorController.SetRightMotorSpeed(value);
//GoPiGoCommand.SwitchLeftLed:
LeftLed.ChangeState((SensorStatus)value);
//GoPiGoCommand.SwitchRightled:
RightLed.ChangeState((SensorStatus)value);
//GoPiGoCommand.SetServoAngle:
motorController.RotateServo(value);
//Build GoPiGo Leds
var leftLed = DeviceFactory.BuildLed(Pin.LedLeft);
var rightLed = DeviceFactory.BuildLed(Pin.LedRight);
//Turn LED On/Off (value = 0 | 1)
leftLed.ChangeState((SensorStatus)value);
forked from OrangeBasement/GoPiGoWin10
-
Notifications
You must be signed in to change notification settings - Fork 0
maciejkuc/GoPiGoWin10
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- PowerShell 64.4%
- C# 29.3%
- HTML 6.3%