GoPiGo v2 with Windows IoT

Improving on the Window 10 IoT project for Raspberry Pi 3.This project is an extension of the CSharp project provided by Dester Industries on GitHub https://github.com/DexterInd/GoPiGo .There were a few gliches for my GoPiGo2 and some features that I wanted to have working.

GoPiGo v2

Things used in this project

Hardware components

Software apps and online services

Windows 10 IoT Core
Windows 10 IoT Core

I am working on adding a second part to stream the web camera image to the client. I am not looking for real-time stream it can have a delay but have yet to get it functioning. The UWP User application also works with Hololens as a UWP App and I will in the future add a project for a Unity user application.

In the Pin.cs file, I added Trigger = 15, and Echo = 16 to the enum.

In the Led.cs file I changed the internal to public.

And last the UltrasonicRangerSensor.cs I rewrote most of the function

public interface IUltrasonicRangerSensor

{

Task<int> MeasureInCentimeters();

}

internal class UltrasonicRangerSensor : IUltrasonicRangerSensor

{

private const byte CommandAddress = 117;

private readonly GoPiGo _device;

private readonly Pin _pin;

internal UltrasonicRangerSensor(GoPiGo device, Pin pin)

{

_device = device;

_pin = pin;

}

public async Task<int> MeasureInCentimeters()

{

var buffer = new[] { CommandAddress, (byte)_pin, Constants.Unused, Constants.Unused };

_device.DirectAccess.Write(buffer);

await Task.Delay(5);

_device.DirectAccess.Read(buffer);

return buffer[1] * 256 + buffer[2];

}

}

 

Read More Detail  :GoPiGo v2 with Windows IoT

Scroll to Top
Scroll to Top
Read previous post:
Kitronik unpacks a Raspberry Pi compatible robot arm
Kitronik unpacks a Raspberry Pi compatible robot arm

In a nutshell, the MeArm is a “flatpack” robot arm that you can build with just a screwdriver and no...

Close