Skip to content

Instantly share code, notes, and snippets.

@lostcaggy
Created January 8, 2010 00:05
Show Gist options
  • Save lostcaggy/271738 to your computer and use it in GitHub Desktop.
Save lostcaggy/271738 to your computer and use it in GitHub Desktop.
class Serialcom1 < ArduinoSketch
#Serial coms example, read value from sensor
#page 69 Getting started with arduino
input_pin 0, :as => :sensor
serial_begin :rate => 19200
def loop
serial_println analogRead sensor
delay 1000
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment