0.0
No commit activity in last 3 years
No release in over 3 years
Library to manipulate beagleBoard devices.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0

Runtime

>= 0
 Project Readme

beagleboard

Build Status

A Ruby gem to manipulate the BeagleBone and BeagleBone Black ADC and GPIOs

usage

require 'beagleboard'

device = BeagleBoard::BeagleBoneBlack.new

# ADCs access
device.p9_39.scale = 100
device.p9_39.raw_value   #=> 2559
device.p9_39.value       #=> 62
device.p9_39.scale = 1.0
device.p9_39.value       #=> 0.624755859375

# GPIO access
device.p8_7.direction = :in
device.p8_7.value            #=> 0 or 1
device.p8_8.direction = :out
device.p8_8.value = 0

# Helpers for setting direction and value 
device.p8_9.direction = :low
device.p8_9.direction = :high

# USR LEDs access (they are GPIO)
10.times do
  device.usr0.value = 1
  sleep 0.1
  device.usr0.value = 0
  sleep 0.1
end