Library C++ for raspberrypi and orangepi, GPIO interfaces compatible with openframeworks.
C++ Makefile C Arduino
Permalink
Failed to load latest commit information.
example-apa102-ledstrip update add class LED apa102 Mar 18, 2016
example-compass-HMC5883L Update Feb 6, 2017
example-gpio-pindescription Update add class GPIOS for decription pin raspberry and H3 only openf… Feb 19, 2017
example-gps-breakout Update: add parsing serial for GPS and clean header Feb 16, 2017
example-i2c-scanner add example i2c scanner and LogHighLight Utility for debug output and… Jan 29, 2017
example-i2c Update example and add i2c write block data and simple write Mar 15, 2016
example-led-matrix8x8 update Mar 16, 2016
example-mpu6050-simple update for Raspberry (2/3/B+/A+/Zero) and add new example Mar 14, 2016
example-mpu6050 update Mar 16, 2016
example-read-write update Mar 16, 2016
example-relay Update example and add i2c write block data and simple write Mar 15, 2016
example-servo Update Feb 6, 2017
example-simple-button update Mar 21, 2016
example-simple-led Update Feb 4, 2017
example-spi fix bug SPI and repair example-spi Aug 30, 2016
example-without-OF-gps-breakout remove swp file Feb 16, 2017
example-without-OF-mcp Update ofxGPIO now outside openFrameworks Oct 4, 2016
example-without-OF-mpu6050-simple Update ofxGPIO now outside openFrameworks Oct 4, 2016
example-without-OF-oled128x64 add OLED class and update example Jan 25, 2017
example-without-OF-simple-led Update Feb 4, 2017
old Update ofxGPIO now outside openFrameworks Oct 4, 2016
screen Update Feb 4, 2017
src Update add class GPIOS for decription pin raspberry and H3 only openf… Feb 19, 2017
tools add script compile all example or only pure cplusplus example Feb 17, 2017
README.md Update Readme Feb 17, 2017
ofxaddons_thumbnail.png manifest Mar 29, 2016

README.md

A small library in C++ for the use of GPIO raspberrypi (A/B/2/3/Zero) orangepi (one/zero/plus) this library is compatible with the toolkit for creative coding Openframeworks. Interface GPIO: SPI (Serial Peripheral Interface), I2C (Inter Integrated Circuit), IO Pin read/write.

Documentation




alt tag alt tag alt tag

Example simple Button Read state:

  • Raspberry pi (2/3/Zero/A/A+/B+)
  • Button
fritzing example:

alt tag

Example simple Led Blink:

  • Raspberry pi (2/3/Zero/A/A+/B+)
  • Led
fritzing example:

alt tag

Example simple Relay on / off Light:

  • Raspberry pi (2/3/Zero/A/A+/B+)
  • Relay 5v
  • Lamp
fritzing example:

alt tag

Example GPS UART: http://aprs.gids.nl/nmea/

  • Raspberry pi (2/3/Zero/A/A+/B+)
  • GPS breakout v3
fritzing example:

alt tag

Example i2c multiple byte read MPU6050:

  • Raspberry pi (2/3/Zero/A/A+/B+)
  • MPU6050
fritzing example:

alt tag

Example Led Matrix8x8:

  • Raspberry pi (2/3/Zero/A/A+/B+)
  • Led Matrix
fritzing example:

alt tag

Example Servo motor(Attention raspberry not to have pin PWM, for this we use a CLK pin, advice integrated pwm):

  • Raspberry pi (2/3/Zero/A/A+/B+)
  • Servo Motor
fritzing example:

alt tag

Example GPIO read/write stepper rotation:

  • Raspberry PI
  • Stepper Motor bipolar
  • sn754410ne H-Bridge
  • Button
  • wiring

fritzing example:

alt tag

sn754410ne H-Bridge:

alt tag


video: http://www.youtube.com/watch?v=lwRd5D9EuU0 video

Example GPIO I2C communication:

  • Raspberry PI
  • Arduino
  • LED
  • Resistor 75 ohm
  • wiring

fritzing example:

alt tag


video: http://www.youtube.com/watch?v=SRz750EdjfY video

Example GPIO SPI add Analog pin MCP3008 potentiometer:

  • Raspberry
  • MCP3008
  • Potentiometer
  • wiring

fritzing example:

alt tag

MCP3008 8-Channel 10-Bit ADC

alt tag


video: http://www.youtube.com/watch?v=PkDkCJyZ2go video


for i2c and SPI configuration visit this page:

https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-spi
https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c




Datasheet integrated list:

Drive motor:
http://www.ti.com/lit/ds/symlink/l293.pdf
http://www.ti.com/lit/ds/symlink/sn754410.pdf
http://www.ti.com/lit/ds/symlink/uln2003a.pdf
http://www.st.com/content/ccc/resource/technical/document/datasheet/f3/6e/c8/64/4d/b3/4e/38/CD00001244.pdf/files/CD00001244.pdf/jcr:content/translations/en.CD00001244.pdf

Motor stepper Bipolar / Unipolar:
http://motion.schneider-electric.com/downloads/datasheets/14_mtr.pdf
http://www.mitsumi.co.jp/latest/Catalog/pdf/motor_m35sp_9_e.pdf

A/D Converters:
https://cdn-shop.adafruit.com/datasheets/MCP3008.pdf
http://ww1.microchip.com/downloads/en/DeviceDoc/21295C.pdf

ATmega48A/PA/88A/PA/168A/PA/328/P:
http://www.atmel.com/images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_Complete.pdf

MPU-6000 / MPU-6050:
https://www.cdiweb.com/datasheets/invensense/MPU-6050_DataSheet_V3%204.pdf

Adafruit Ultimate GPS:
https://cdn-learn.adafruit.com/downloads/pdf/adafruit-ultimate-gps.pdf

Adafruit LED Backpacks:
https://cdn-learn.adafruit.com/downloads/pdf/adafruit-led-backpack.pdf

EEPROM
http://www.bucek.name/pdf/24c16.pdf http://www.st.com/content/ccc/resource/technical/document/datasheet/5c/df/52/a5/15/f2/48/bd/CD00259166.pdf/files/CD00259166.pdf/jcr:content/translations/en.CD00259166.pdf