Permalink
Browse files

merging changes to bin/rad, adding software_serial example

  • Loading branch information...
2 parents cb8a6c4 + 41e0c18 commit ac37507755f45b2a9358374286e5138c4d140e4e Greg Borenstein committed Sep 22, 2008
View
@@ -2,4 +2,5 @@
bin/.DS_Store
lib/.DS_Store
lib/libraries/.DS_Store
-lib/rad/.DS_Store
+lib/rad/.DS_Store
+lib/libraries/*/*.*
View
@@ -28,8 +28,11 @@ lib/examples/hello_pa_lcd.rb
lib/examples/hello_servos.rb
lib/examples/hello_spectra_sound.rb
lib/examples/hello_world.rb
+lib/examples/hello_xbee.rb
lib/examples/hysteresis_duel.rb
lib/examples/i2c_with_clock_chip.rb
+lib/examples/midi_beat_box.rb
+lib/examples/midi_scales.rb
lib/examples/motor_knob.rb
lib/examples/servo_buttons.rb
lib/examples/servo_calibrate_continuous.rb
@@ -38,7 +41,13 @@ lib/examples/sparkfun_lcd.rb
lib/examples/spectra_soft_pot.rb
lib/examples/times_method.rb
lib/examples/toggle.rb
+lib/examples/twitter.rb
lib/examples/two_wire.rb
+lib/libraries/AFSoftSerial/AFSoftSerial.cpp
+lib/libraries/AFSoftSerial/AFSoftSerial.h
+lib/libraries/AFSoftSerial/keywords.txt
+lib/libraries/AF_XPort/AF_XPort.cpp
+lib/libraries/AF_XPort/AF_XPort.h
lib/libraries/DS1307/DS1307.cpp
lib/libraries/DS1307/DS1307.h
lib/libraries/DS1307/keywords.txt
@@ -79,13 +88,16 @@ lib/plugins/hysteresis.rb
lib/plugins/input_output_state.rb
lib/plugins/lcd_padding.rb
lib/plugins/mem_test.rb
+lib/plugins/midi.rb
+lib/plugins/parallax_ping.rb
lib/plugins/servo_pulse.rb
lib/plugins/servo_setup.rb
lib/plugins/smoother.rb
lib/plugins/spark_fun_serial_lcd.rb
lib/plugins/spectra_symbol.rb
+lib/plugins/twitter_connect.rb
lib/rad.rb
-lib/rad/arduino_hardware_config.rb
+lib/rad/README.rdoc
lib/rad/arduino_plugin.rb
lib/rad/arduino_sketch.rb
lib/rad/generators/makefile/makefile.erb
View
8 bin/rad 100755 → 100644
@@ -25,7 +25,7 @@ class OptionParser #:nodoc:
"physical_reset" => false
},
"software" => {
- "arduino_root" => "/Applications/arduino-0011"
+ "arduino_root" => "/Applications/arduino-0012"
}
}
@@ -253,4 +253,10 @@ else
puts
puts "Run 'rake -T' inside your sketch dir to learn how to compile and upload it."
+
+ puts "***************************************************"
+ puts "*** Please note: This version supports ***"
+ puts "*** Arduino 12 only! ***"
+ puts "*** run rad install arduino to upgrade ***"
+ puts "***************************************************"
end
@@ -0,0 +1,12 @@
+class HelloXbee < ArduinoSketch
+
+ output_pin 13, :as => :led
+
+ serial_begin
+ def loop
+ led.blink 200
+ serial_print "...testing..."
+ delay 1000
+ end
+
+end
@@ -0,0 +1,10 @@
+class SoftwareSerial < ArduinoSketch
+ output_pin 13, :as => :led
+ software_serial 6, 7, :as => :gps
+ serial_begin
+
+ def loop
+ digitalWrite(led, true)
+ serial_print(gps.read)
+ end
+end
@@ -0,0 +1,57 @@
+class Twitter < ArduinoSketch
+
+ #include <avr/io.h>
+ #include <string.h>
+
+
+
+ define "TWEETLEN 141"
+ define "HOSTNAME www.twitter.com"
+
+ define 'IPADDR "128.121.146.100"' # twitter.com
+ define "PORT 80" # // HTTP
+ define "HTTPPATH /atduskgreg/" # // the person we want to follow
+
+
+ define "TWEETLEN 141"
+ array "char linebuffer[256]" # // our large buffer for data
+ array "char tweet[TWEETLEN]" # // the tweet
+ @lines = 0
+
+
+ define "XPORT_RXPIN 2"
+ define "XPORT_TXPIN 3"
+ define "XPORT_RESETPIN 4"
+ define "XPORT_DTRPIN 5"
+ define "XPORT_CTSPIN 6"
+ define "XPORT_RTSPIN 7"
+
+
+ @errno = 0
+ @laststatus = 0
+ @currstatus = 0
+
+
+
+# in setup
+#xport = AF_XPort(XPORT_RX, XPORT_TX, XPORT_RESET, XPORT_DTR, XPORT_RTS, XPORT_CTS)
+
+
+ output_pin 10, :as => :shield, :device => :ethernet
+
+ serial_begin :rate => 57600
+
+ def loop
+
+# local_connect()
+ # kind of a problem... fixed
+ get_tweet
+ fetchtweet
+ delay 30000
+
+
+ end
+
+
+
+end
Oops, something went wrong.

0 comments on commit ac37507

Please sign in to comment.