All Projects → kashimAstro → Ofxgpio

kashimAstro / Ofxgpio

Licence: mit
Library C++ for raspberrypi and orangepi, GPIO interfaces compatible with openframeworks.

Projects that are alternatives of or similar to Ofxgpio

Mraa
Linux Library for low speed IO Communication in C with bindings for C++, Python, Node.js & Java. Supports generic io platforms, as well as Intel Edison, Intel Joule, Raspberry Pi and many more.
Stars: ✭ 1,220 (+687.1%)
Mutual labels:  io, raspberry-pi, spi, i2c, gpio
Rppal
A Rust library that provides access to the Raspberry Pi's GPIO, I2C, PWM, SPI and UART peripherals.
Stars: ✭ 463 (+198.71%)
Mutual labels:  raspberry-pi, spi, i2c, gpio
Pjon
PJON (Padded Jittering Operative Network) is an experimental, arduino-compatible, multi-master, multi-media network protocol.
Stars: ✭ 2,615 (+1587.1%)
Mutual labels:  raspberry-pi, network, tcp, internet-of-things
Cylon
JavaScript framework for robotics, drones, and the Internet of Things (IoT)
Stars: ✭ 3,862 (+2391.61%)
Mutual labels:  raspberry-pi, i2c, gpio, internet-of-things
Diozero
Java Device I/O library that is portable across Single Board Computers. Tested with Raspberry Pi, Odroid C2, BeagleBone Black, Next Thing CHIP, Asus Tinker Board and Arduinos. Supports GPIO, I2C, SPI as well as Serial communication. Also known to work with Udoo Quad.
Stars: ✭ 167 (+7.74%)
Mutual labels:  raspberry-pi, spi, i2c, gpio
Swiftygpio
A Swift library for hardware projects on Linux/ARM boards with support for GPIOs/SPI/I2C/PWM/UART/1Wire.
Stars: ✭ 1,188 (+666.45%)
Mutual labels:  raspberry-pi, spi, i2c, gpio
Periph
Go·Hardware·Lean
Stars: ✭ 1,700 (+996.77%)
Mutual labels:  raspberry-pi, spi, i2c, gpio
Johnny Five
JavaScript Robotics and IoT programming framework, developed at Bocoup.
Stars: ✭ 12,498 (+7963.23%)
Mutual labels:  raspberry-pi, spi, i2c, gpio
Gopi
Raspberry Pi Go Language Interface
Stars: ✭ 82 (-47.1%)
Mutual labels:  raspberry-pi, spi, i2c, gpio
Ssd1306
Driver for SSD1306, SSD1331, SSD1351, IL9163, ILI9341, ST7735, PCD8544, Nokia 5110 displays running on Arduino/ESP32/Linux (Rasperry) platforms
Stars: ✭ 303 (+95.48%)
Mutual labels:  raspberry-pi, spi, i2c
Elixir ale
Interact with hardware in Elixir - GPIOs, I2C and SPI
Stars: ✭ 336 (+116.77%)
Mutual labels:  spi, i2c, gpio
Esp32 Mpu Driver
ESP32 full library for all MPU6000 MPU6050 MPU6500 MPU9150 MPU9250 with SPI and I2C support and more.
Stars: ✭ 111 (-28.39%)
Mutual labels:  spi, i2c, library
gobot
Golang framework for robotics, drones, and the Internet of Things (IoT)
Stars: ✭ 7,869 (+4976.77%)
Mutual labels:  gpio, i2c, internet-of-things
tinyfont
Text library for TinyGo displays
Stars: ✭ 37 (-76.13%)
Mutual labels:  gpio, i2c, spi
Powershell Iot
Interact with I2C, SPI & GPIO devices using PowerShell Core!
Stars: ✭ 106 (-31.61%)
Mutual labels:  spi, i2c, gpio
awesome-embedded-swift
⚡️🛠🧰 A curated list for Embedded and Low-Level development in the Swift programming language.
Stars: ✭ 57 (-63.23%)
Mutual labels:  gpio, i2c, spi
Luma.oled
Python module to drive a SSD1306 / SSD1309 / SSD1322 / SSD1325 / SSD1327 / SSD1331 / SSD1351 / SH1106 OLED
Stars: ✭ 560 (+261.29%)
Mutual labels:  raspberry-pi, spi, i2c
Raspberrysharp
A .NET/Mono IO Library for Raspberry Pi This library is a complete refactoring of Raspberry-Sharp libraries, merged into one library and updated to RB3, CM3 and RB3+
Stars: ✭ 41 (-73.55%)
Mutual labels:  spi, i2c, gpio
Pnet
High level Java network library
Stars: ✭ 49 (-68.39%)
Mutual labels:  library, network, tcp
Tinygo
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
Stars: ✭ 9,068 (+5750.32%)
Mutual labels:  spi, i2c, gpio

ofxGPIO

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. With utilities such as: graphical gui (Gtk+ / Zenity) and TCP Unix socket implementation.

Documentation

/* define for activated more functionality */

-D COMPILE_WITHOUT_OPENFRAMEWORKS /* if = 1 work pure c++ without openframeworks toolkit */
-D GTK_UI 			  /* if = 1 activated c++ simple bridge for UI gtk+ */
-D ENABLE_BCM2835		  /* if = 1 activated c header BCM2835 */
-D ENABLE_ZENITY                  /* if = 1 activated zenity for UI debug */

Sample simple syntax ofxGPIO I/O

#include <iostream>
#include "ofxGPIO.h"

int main() 
{
        GPIO gpio;
        string state;
        int i = 0;

        gpio.setup(GPIO17,OUT,LOW);

        while(i<100)
        {
            gpio.set(HIGH);
            state = "State pin17: "+to_string(gpio.get());
            Log(state,FG_RED,BG_WHITE) <<"\n";
            sleep(2);

            gpio.set(LOW);
            state = "State pin17: "+to_string(gpio.get());
            Log(state,FG_BLUE,BG_WHITE) <<"\n";
            sleep(2);

            i++;
        }

        gpio.close();
        return 0;
}

GPIO support

Simple Gtk+ UI Utility

Sample syntax ofxGPIO i2c

I2c * bus;

bus = new I2c("/dev/i2c-1");
bus->addressSet(0x04);

while(1) 
{
	bus->writeByte(0x04,1);
	usleep(500000);
	bus->writeByte(0x04,0);
	usleep(500000);
}

Zenity UI Utility

Sample

Sample syntax ofxGPIO SPI

SPI2 spi;
char data[2];

data[0] = 1;
data[1] = 2;

spi.setup("/dev/spidev0.0",1000000);
spi.readWrite(1, (unsigned char *)data, 2);

Example ofxGPIO

Example scanner with nRF24L01:

  • Raspberry pi (2/3/Zero/A/A+/B+)
  • nRF24L01
fritzing example: 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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].