0.0
No commit activity in last 3 years
No release in over 3 years
Gem for interacting with Intel Galileo board
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
>= 0
 Project Readme

IntelGalileo

Build Status

Gem for interacting with Intel Galileo board with support for Digital In/Out Pins (0 - 13), Analog In Pins (A0-A5) and PWM pins [3,5,6,9,10,11].

Ruby installation on Galileo

Some images have devtools installed on board by default - in that case compile ruby from source.

If you don't have gcc on board, follow custom image installation and customization posts.

Installation

If you have ruby installed, add this line to your application's Gemfile:

gem 'intel_galileo'

And then execute:

$ bundle

Or install it yourself as:

$ gem install intel_galileo

Usage

Digital In:

led    = IntelGalileo::DigitalPin.new(7)
led.write(1) # Write 0 or 1

Digital Out:

button = IntelGalileo::DigitalPin.new(5)
puts button.read # returns 0 or 1

Analog In:

potentiometer = IntelGalileo::AnalogInPin.new('A0')
puts potentiometer.read # returns value between 0 and 4095

PWM:

led = IntelGalileo::Pwm.new(3)
led.on(50) # led will be dimmed (50% of the brightness)
led.off

For more examples please see /examples folder

TODO

Found a bug? Something missing? Report it!

Contributing

If you wish to help and looking for inspiration see list of bugs/enhancements.

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request