#define

#define isn’t used in C# (well it is sort of, see below, but the general usage isn’t available) You can’t use it to create macros. Bloody annoying, but get over it – you can’t!  So instead use constants. See constants here How #define is used in C# #define is only used to create something to test […]

Read More

Variables

The structure below shows the various basic types of C# and the types they map to in the .Net framework. C# Short Name .Net Class Declaration Description bool Boolean bool isValid = true; 8 bit true or false sbyte SByte sbyte b = -1 signed 8 bit integer byte Byte byte b = 1; 8 bit […]

Read More

Get I2C Port Names

  //Get I2C Port Name string AqsFilter = I2cDevice.GetDeviceSelector(); var dis = await DeviceInformation.FindAllAsync(AqsFilter); if (dis.Count > 0) System.Diagnostics.Debug.WriteLine(dis[0].Id);  

Read More

Writing to the console

  System.Diagnostics.Debug.WriteLine(“My Value: ” + Convert.ToString(MyVariable)); or using System.Diagnostics; Debug.WriteLine(“My Value: ” + Convert.ToString(MyVariable));  

Read More

RPi Using The I2C Interface

See the IO Pins page here for any extensions needed by Visual Studio and to enable the IO pins. Namespaces Initialise I2C Port For A Device Write Bytes Write Then Read Bytes Read Bytes Disposing Of A I2C Device Object

Read More

RPi IO Pins

Visual Studio Requirements Windows IoT Extension for UWP extension is needed – right clicking on your project. Then, select Add > Reference..  Select Universal Windows > Exensions > Windows IoT Extension for the UWP, select the latest version and press OK Add IO Pins Capability (Includes adding SPI port, I2C port, etc capabilities) To enable […]

Read More

Web Configuration Interface

To access the web configuration interface use your browser with the following URL: http://<ip_address_of_your_device>:8080/ If you don't know the device IP address you can use the Microsoft "Windows 10 IoT Core Dashboard" application to find the device and give you its IP address. Log in: Username: Administrator Password: your password      

Read More

Running The Application

Running The Application On Your Device Select ‘Remote Machine’ from the run target drop down. Your device will likely be in the Auto Detected box. Alternatively enter the IP address of the device. Changing IP address later To change the device IP address select Menu > Debug > [your project name] Properties… We also have […]

Read More