README.md in arduino_firmata-0.2.9 vs README.md in arduino_firmata-0.3.0
- old
+ new
@@ -1,10 +1,13 @@
arduino_firmata
===============
+Arduino Firmata protocol (http://firmata.org) implementation on Ruby.
-* Arduino Firmata protocol (http://firmata.org) implementation on Ruby.
-* http://shokai.github.com/arduino_firmata
+* Firmata is a protocol to controll Arduino from software on PC.
+* You can embed Arduino code into Ruby application.
+* Support sharing an Arduino between multiple processes.
+* http://shokai.github.io/arduino_firmata
Install
-------
@@ -71,10 +74,11 @@
Digital Read
```ruby
arduino.pin_mode 7, ArduinoFirmata::INPUT
puts arduino.digital_read 7 # => true/false
+## regist event
arduino.on :digital_read do |pin, status|
if pin == 7
puts "digital pin #{pin} changed : #{status}"
end
end
@@ -90,9 +94,10 @@
Analog Read
```ruby
puts arduino.analog_read 0 # => 0 ~ 1023
+## regist event
arduino.on :analog_read do |pin, value|
if pin == 0
puts "analog pin #{pin} changed : #{value}"
end
end
\ No newline at end of file