BBBCSIO
A C# I/O Library for the Beaglebone Black

Example Code

 

Example Code

Sample code illustrating the use of each of the main classes in the BBBCSIO library. The source code for all classes in the BBBCSIO library are available online for download and also in browseable form.

How to use the A2DPort Class
Examples demonstrating the use of the A2DPortFS class to read from the Analog to Digital inputs on the Beaglebone Black.

How to use the I2CPort Class
Examples demonstrating the use of the I2CPortFS class to write to and read from the I2C ports on the Beaglebone Black.

How to use the InputPort Classes
Examples demonstrating the use of the InputPortFS and InputPortMM classes to read the state (high or low) of a GPIO pin on the Beaglebone Black.

How to use the InterruptPort Class
Examples demonstrating the use of the InterruptPortMM class to trigger a .NET event on a state change (high or low) of a GPIO pin on the Beaglebone Black.

How to use the OutputPort Classes
Examples demonstrating the use of the OutputPortFS and OutputPortMM classes to set the state (high or low) of a GPIO pin on the Beaglebone Black.

How to use the PRU_Driver Class
Examples demonstrating the use of the PRU_Driver class to launch code in the Beaglebone Black Programmable Real Time Units (PRUs) and how that code can interact with executing user space C# programs via interrupts, data exchange and I/O (both via GPIO and Direct).

How to use the PWMPort Class
Examples demonstrating how to use the PWMPort class to enable a PWM output, set its fundamental frequency and adjust the duty cycle.

How to use the SerialPort Class
Examples demonstrating the use of the SerialPortFS class to write to and read from the serial ports on the Beaglebone Black.

How to use the SPIPort Class
Examples demonstrating the use of the SPIPortFS class to write to and read from the SPI ports on the Beaglebone Black.