How To Install
If you do not have ruby installed, you'll need to do that first.
Then install the artoo-raspi gem:
sudo gem install artoo-raspi
How To Use
This small program causes an LED to blink.
require 'artoo' connection :raspi, :adaptor => :raspi device :led, :driver => :led, :pin => 11 work do every 1.second do led.toggle end end
To run the examples, requires sudo access on the Raspberry Pi:
sudo ruby examples/raspi_led.rb
Important Note: You need to install pi-blaster in the raspberry-pi, this project enables PWM in the GPIO pins for some of the drivers like LED, Motor and Servo.
How To Connect
Connecting to Raspberry Pi GPIO
This gem only works on a real Raspberry Pi. Do not bother trying on any other kind of computer it will not work. Also note you will need to connect actual circuits to the Raspberry Pi's GPIO pins.
Enabling the Raspberry Pi i2c on raspbian
You must add these two entries in your /etc/modules
You must also ensure that these entries are commented in your /etc/modprobe.d/raspi-blacklist.conf
#blacklist spi-bcm2708 #blacklist i2c-bcm2708
Now restart your raspberry pi.
Enabling PWM output on GPIO pins.
You need to install and have pi-blaster running in the raspberry-pi, you can follow the instructions for pi-blaster install on our repo here:https://github.com/hybridgroup/pi-blaster
All Artoo digital and PWM GPIO, and i2c drivers listed below should work with the Raspberry Pi: