Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Artoo - Ruby on Robotics #59

Open
lcguida opened this issue Jun 4, 2016 · 0 comments
Open

Artoo - Ruby on Robotics #59

lcguida opened this issue Jun 4, 2016 · 0 comments

Comments

@lcguida
Copy link

lcguida commented Jun 4, 2016

Utiliser du ruby pour faire de la robotique

Example avec Arduino:

require 'artoo'

connection :arduino, adaptor: :firmata, port: '/dev/ttyACM0'

device :led, driver: :led, pin: 13
device :button, driver: :button, pin: 2, interval: 0.01

work do
  puts "Press the button connected on pin #{ button.pin }..."

  on button, :push    => proc { led.on }
  on button, :release => proc { led.off }
end
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants