rad 0.2.2 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. data/History.txt +34 -0
  2. data/Manifest.txt +113 -7
  3. data/{README.txt → README.rdoc} +17 -5
  4. data/Rakefile +3 -0
  5. data/bin/rad +106 -1
  6. data/lib/examples/add_hysteresis.rb +13 -0
  7. data/lib/examples/basic_blink.rb +10 -0
  8. data/lib/examples/blink_m_address_assignment.rb +104 -0
  9. data/lib/examples/blink_m_hello.rb +14 -0
  10. data/lib/examples/blink_m_multi.rb +61 -0
  11. data/lib/examples/blink_with_serial.rb +16 -0
  12. data/lib/examples/configure_pa_lcd_boot.rb +91 -0
  13. data/lib/examples/debounce_methods.rb +49 -0
  14. data/lib/examples/external_variable_fu.rb +26 -0
  15. data/lib/examples/external_variables.rb +32 -0
  16. data/lib/examples/first_sound.rb +23 -0
  17. data/lib/examples/frequency_generator.rb +30 -0
  18. data/lib/examples/hello_array.rb +48 -0
  19. data/lib/examples/hello_array2.rb +79 -0
  20. data/lib/examples/hello_array_eeprom.rb +59 -0
  21. data/lib/examples/hello_clock.rb +84 -0
  22. data/lib/examples/hello_eeprom.rb +51 -0
  23. data/lib/examples/hello_eeprom_lcdpa.rb +81 -0
  24. data/lib/examples/hello_format_print.rb +94 -0
  25. data/lib/examples/hello_lcd_charset.rb +75 -0
  26. data/lib/examples/hello_pa_lcd.rb +59 -0
  27. data/lib/examples/hello_servos.rb +88 -0
  28. data/lib/examples/hello_spectra_sound.rb +38 -0
  29. data/lib/examples/hello_world.rb +11 -0
  30. data/lib/examples/hello_xbee.rb +12 -0
  31. data/lib/examples/hysteresis_duel.rb +39 -0
  32. data/lib/examples/i2c_with_clock_chip.rb +124 -0
  33. data/lib/examples/midi_beat_box.rb +86 -0
  34. data/lib/examples/midi_scales.rb +94 -0
  35. data/lib/examples/motor_knob.rb +30 -0
  36. data/lib/examples/servo_buttons.rb +23 -0
  37. data/lib/examples/servo_calibrate_continuous.rb +92 -0
  38. data/lib/examples/servo_throttle.rb +40 -0
  39. data/lib/examples/sparkfun_lcd.rb +48 -0
  40. data/lib/examples/spectra_soft_pot.rb +34 -0
  41. data/lib/examples/times_method.rb +8 -0
  42. data/lib/examples/toggle.rb +10 -0
  43. data/lib/examples/twitter.rb +57 -0
  44. data/lib/examples/two_wire.rb +14 -0
  45. data/lib/libraries/AFSoftSerial/AFSoftSerial.cpp +321 -0
  46. data/lib/libraries/AFSoftSerial/AFSoftSerial.h +61 -0
  47. data/lib/libraries/AFSoftSerial/keywords.txt +18 -0
  48. data/lib/libraries/AF_XPort/AF_XPort.cpp +166 -0
  49. data/lib/libraries/AF_XPort/AF_XPort.h +48 -0
  50. data/lib/libraries/DS1307/DS1307.cpp +162 -0
  51. data/lib/libraries/DS1307/DS1307.h +66 -0
  52. data/lib/libraries/{SWSerLCDpa → DS1307}/keywords.txt +1 -1
  53. data/lib/libraries/FrequencyTimer2/FrequencyTimer2.cpp +144 -0
  54. data/lib/libraries/FrequencyTimer2/FrequencyTimer2.h +42 -0
  55. data/lib/libraries/FrequencyTimer2/keywords.txt +22 -0
  56. data/lib/libraries/I2CEEPROM/I2CEEPROM.cpp +120 -0
  57. data/lib/libraries/I2CEEPROM/I2CEEPROM.h +70 -0
  58. data/lib/libraries/I2CEEPROM/keywords.txt +21 -0
  59. data/lib/libraries/LoopTimer/LoopTimer.cpp +35 -0
  60. data/lib/libraries/LoopTimer/LoopTimer.h +34 -0
  61. data/lib/libraries/LoopTimer/keywords.txt +27 -0
  62. data/lib/libraries/OneWire/OneWire.cpp +194 -0
  63. data/lib/libraries/OneWire/OneWire.h +63 -0
  64. data/lib/libraries/OneWire/keywords.txt +35 -0
  65. data/lib/libraries/OneWire/readme.txt +13 -0
  66. data/lib/libraries/SWSerLCDpa/SWSerLCDpa.cpp +93 -47
  67. data/lib/libraries/SWSerLCDpa/SWSerLCDpa.h +16 -9
  68. data/lib/libraries/SWSerLCDsf/SWSerLCDsf.cpp +311 -0
  69. data/lib/libraries/SWSerLCDsf/SWSerLCDsf.h +67 -0
  70. data/lib/libraries/Servo/Servo.cpp +192 -0
  71. data/lib/libraries/Servo/Servo.h +61 -0
  72. data/lib/libraries/Stepper/Stepper.cpp +220 -0
  73. data/lib/libraries/Stepper/Stepper.h +86 -0
  74. data/lib/libraries/Stepper/keywords.txt +28 -0
  75. data/lib/libraries/Wire/Wire.cpp +262 -0
  76. data/lib/libraries/Wire/Wire.h +67 -0
  77. data/lib/libraries/Wire/keywords.txt +31 -0
  78. data/lib/libraries/Wire/twi.h +57 -0
  79. data/lib/libraries/Wire/utility/twi.c +449 -0
  80. data/lib/libraries/Wire/utility/twi.h +57 -0
  81. data/lib/plugins/bitwise_ops.rb +54 -0
  82. data/lib/plugins/blink.rb +25 -0
  83. data/lib/plugins/blink_m.rb +356 -0
  84. data/lib/plugins/debounce.rb +138 -0
  85. data/lib/plugins/debug_output_to_lcd.rb +71 -0
  86. data/lib/plugins/hysteresis.rb +52 -0
  87. data/lib/plugins/input_output_state.rb +84 -0
  88. data/lib/plugins/lcd_padding.rb +58 -0
  89. data/lib/plugins/mem_test.rb +37 -0
  90. data/lib/plugins/midi.rb +60 -0
  91. data/lib/plugins/parallax_ping.rb +50 -0
  92. data/lib/plugins/servo_pulse.rb +31 -0
  93. data/lib/plugins/servo_setup.rb +86 -0
  94. data/lib/plugins/smoother.rb +54 -0
  95. data/lib/plugins/spark_fun_serial_lcd.rb +100 -0
  96. data/lib/plugins/spectra_symbol.rb +79 -0
  97. data/lib/plugins/twitter_connect.rb +145 -0
  98. data/lib/rad/README.rdoc +5 -0
  99. data/lib/rad/arduino_plugin.rb +246 -0
  100. data/lib/rad/arduino_sketch.rb +351 -257
  101. data/lib/rad/generators/makefile/makefile.erb +1 -1
  102. data/lib/rad/generators/makefile/makefile.rb +9 -10
  103. data/lib/rad/hardware_library.rb +813 -0
  104. data/lib/rad/init.rb +3 -1
  105. data/lib/rad/rad_processor.rb +128 -0
  106. data/lib/rad/rad_rewriter.rb +94 -0
  107. data/lib/rad/rad_type_checker.rb +26 -0
  108. data/lib/rad/sim/arduino_sketch.rb +57 -0
  109. data/lib/rad/sketch_compiler.rb +47 -0
  110. data/lib/rad/tasks/build_and_make.rake +146 -24
  111. data/lib/rad/variable_processing.rb +153 -0
  112. data/lib/rad/version.rb +1 -1
  113. data/spec/examples/hello_world.rb +11 -0
  114. data/spec/examples/serial_motor.rb +12 -0
  115. data/spec/models/sketch_compiler_spec.rb +96 -0
  116. data/spec/sim/hello_world_spec.rb +42 -0
  117. data/test/test_array_processing.rb +179 -0
  118. data/test/test_plugin_loading.rb +151 -0
  119. data/test/test_translation_post_processing.rb +185 -0
  120. data/test/test_variable_processing.rb +238 -0
  121. data/website/index.html +22 -7
  122. data/website/stylesheets/screen.css +32 -1
  123. metadata +130 -13
@@ -29,13 +29,26 @@
29
29
  </head>
30
30
  <body>
31
31
  <div id="main">
32
-
32
+ <div id="metadata">
33
+ <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/rad"; return false'>
34
+ <p>Get Version</p>
35
+ <a href="http://rubyforge.org/projects/rad" class="numbers">0.2.2</a>
36
+ </div>
37
+ <div id="buy-arduino">
38
+ <h3>Sponsored by:</h3>
39
+ <h4>The Shoppe at Wulfden</h4>
40
+ <a href="http://www.wulfden.org/freeduino/freeduino.shtml">
41
+ <img src="http://www.wulfden.org/freeduino/freeduino-1.jpg" /><br />
42
+ </a>
43
+ <h4><a href="http://www.wulfden.org/freeduino/freeduino.shtml">Totally Open Arduino-Compatible Hardware</a></h4>
44
+
45
+
46
+ </div>
47
+ </div>
33
48
  <h1>RAD</h1>
34
- <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/rad"; return false'>
35
- <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/rad" class="numbers">0.2.1</a>
37
- </div>
38
49
  <h1>&#x2192; &#8216;Ruby Arduino Development&#8217;</h1>
50
+
51
+
39
52
 
40
53
 
41
54
  <h2>What?</h2>
@@ -43,6 +56,8 @@
43
56
 
44
57
  <p><span class="caps">RAD</span> is a framework for programming the Arduino physcial computing platform using Ruby. <span class="caps">RAD</span> converts Ruby scripts written using a set of Rails-like conventions and helpers into C source code which can be compiled and run on the Arduino microcontroller. It also provides a set of Rake tasks for automating the compilation and upload process.</p>
45
58
 
59
+ <br style="clear:both" />
60
+
46
61
  <h2>Demo: 'Hello World'</h2>
47
62
 
48
63
  <p>Here's a basic demo of <span class="caps">RAD</span> in action. In this movie, we'll write, compile, and upload the universal physical computing 'Hello World': a single flashing LED.
@@ -62,7 +77,7 @@
62
77
  <p><code>$ sudo gem install rad</code></p>
63
78
 
64
79
 
65
- <p>You&#8217;ll also need to have the Arduino environment installed, which you can get from <a href="http://www.arduino.cc/en/Main/Software">the Arduino website</a>. <span class="caps">RAD</span> currently requires Arduino 0010, but we try to keep it up-to-date with new Arduino releases.</p>
80
+ <p>You&#8217;ll also need to have the Arduino environment installed, which you can get from <a href="http://www.arduino.cc/en/Main/Software">the Arduino website</a>. <span class="caps">RAD</span> currently requires Arduino 0011, but we try to keep it up-to-date with new Arduino releases.</p>
66
81
 
67
82
 
68
83
  <h2>The Basics</h2>
@@ -126,7 +141,7 @@ end
126
141
  <p>There&#8217;s lots to do.</p>
127
142
 
128
143
 
129
- <p>If you&#8217;re looking for a place to dive in and don&#8217;t know quite where, <a href="mailto:ruby-arduino-development@googlegroups.com">email the RAD Google Group</a>; we're friendly! If you want to start by taking a log at the code, the trunk repository is <code>svn://rubyforge.org/var/svn/rad/trunk</code> for anonymous access.</p>
144
+ <p>If you&#8217;re looking for a place to dive in and don&#8217;t know quite where, <a href="mailto:ruby-arduino-development@googlegroups.com">email the RAD Google Group</a>; we're friendly! If you want to start by taking a look at the code, check out RAD on GitHub: <code>http://github.com/atduskgreg/rad/tree/master</code>.</p>
130
145
 
131
146
 
132
147
  <h2>License</h2>
@@ -34,6 +34,30 @@ blockquote {
34
34
  border-left: 1px solid #111;
35
35
  padding-left: 1em;
36
36
  }
37
+
38
+ #buy-arduino {
39
+ float:left;
40
+ margin-right: 10px;
41
+ border: 8px solid #000;
42
+ background-color: #fff;
43
+ padding: 5px;
44
+ text-align:center;
45
+ }
46
+
47
+ #buy-arduino h4{
48
+ font-size: 12px;
49
+ margin: 0;
50
+ }
51
+
52
+ #buy-arduino a {
53
+ background-color: #fff;
54
+ }
55
+
56
+ #buy-arduino img{
57
+ width: 190px;
58
+ border: none;
59
+ }
60
+
37
61
  .caps {
38
62
  font-size: 80%;
39
63
  }
@@ -96,8 +120,13 @@ pre, code {
96
120
  .number { color: #F99; }
97
121
  .expr { color: #227; }
98
122
 
123
+ #metadata {
124
+ float: left;
125
+ margin-right: 20px;
126
+ }
127
+
99
128
  #version {
100
- float: right;
129
+ width:210px;
101
130
  text-align: right;
102
131
  font-family: sans-serif;
103
132
  font-weight: normal;
@@ -107,6 +136,8 @@ pre, code {
107
136
  margin: 0 auto;
108
137
  margin-top: 15px;
109
138
  border: 3px solid #141331;
139
+ margin-bottom: 20px;
140
+
110
141
  }
111
142
 
112
143
  #version .numbers {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Borenstein
@@ -9,11 +9,12 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-04-27 00:00:00 -07:00
12
+ date: 2008-09-21 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: RubyToC
17
+ type: :runtime
17
18
  version_requirement:
18
19
  version_requirements: !ruby/object:Gem::Requirement
19
20
  requirements:
@@ -31,34 +32,147 @@ extra_rdoc_files:
31
32
  - History.txt
32
33
  - License.txt
33
34
  - Manifest.txt
34
- - README.txt
35
- - lib/libraries/SWSerLCDpa/keywords.txt
35
+ - lib/libraries/AFSoftSerial/keywords.txt
36
+ - lib/libraries/DS1307/keywords.txt
37
+ - lib/libraries/FrequencyTimer2/keywords.txt
38
+ - lib/libraries/I2CEEPROM/keywords.txt
39
+ - lib/libraries/LoopTimer/keywords.txt
40
+ - lib/libraries/OneWire/keywords.txt
41
+ - lib/libraries/OneWire/readme.txt
42
+ - lib/libraries/Stepper/keywords.txt
43
+ - lib/libraries/Wire/keywords.txt
36
44
  - lib/rad/todo.txt
37
45
  - website/index.txt
38
46
  files:
39
47
  - History.txt
40
48
  - License.txt
41
49
  - Manifest.txt
42
- - README.txt
50
+ - README.rdoc
43
51
  - Rakefile
44
52
  - bin/rad
45
- - lib/libraries/SWSerLCDpa/keywords.txt
53
+ - lib/examples/add_hysteresis.rb
54
+ - lib/examples/basic_blink.rb
55
+ - lib/examples/blink_m_address_assignment.rb
56
+ - lib/examples/blink_m_hello.rb
57
+ - lib/examples/blink_m_multi.rb
58
+ - lib/examples/blink_with_serial.rb
59
+ - lib/examples/configure_pa_lcd_boot.rb
60
+ - lib/examples/debounce_methods.rb
61
+ - lib/examples/external_variable_fu.rb
62
+ - lib/examples/external_variables.rb
63
+ - lib/examples/first_sound.rb
64
+ - lib/examples/frequency_generator.rb
65
+ - lib/examples/hello_array.rb
66
+ - lib/examples/hello_array2.rb
67
+ - lib/examples/hello_array_eeprom.rb
68
+ - lib/examples/hello_clock.rb
69
+ - lib/examples/hello_eeprom.rb
70
+ - lib/examples/hello_eeprom_lcdpa.rb
71
+ - lib/examples/hello_format_print.rb
72
+ - lib/examples/hello_lcd_charset.rb
73
+ - lib/examples/hello_pa_lcd.rb
74
+ - lib/examples/hello_servos.rb
75
+ - lib/examples/hello_spectra_sound.rb
76
+ - lib/examples/hello_world.rb
77
+ - lib/examples/hello_xbee.rb
78
+ - lib/examples/hysteresis_duel.rb
79
+ - lib/examples/i2c_with_clock_chip.rb
80
+ - lib/examples/midi_beat_box.rb
81
+ - lib/examples/midi_scales.rb
82
+ - lib/examples/motor_knob.rb
83
+ - lib/examples/servo_buttons.rb
84
+ - lib/examples/servo_calibrate_continuous.rb
85
+ - lib/examples/servo_throttle.rb
86
+ - lib/examples/sparkfun_lcd.rb
87
+ - lib/examples/spectra_soft_pot.rb
88
+ - lib/examples/times_method.rb
89
+ - lib/examples/toggle.rb
90
+ - lib/examples/twitter.rb
91
+ - lib/examples/two_wire.rb
92
+ - lib/libraries/AFSoftSerial/AFSoftSerial.cpp
93
+ - lib/libraries/AFSoftSerial/AFSoftSerial.h
94
+ - lib/libraries/AFSoftSerial/keywords.txt
95
+ - lib/libraries/AF_XPort/AF_XPort.cpp
96
+ - lib/libraries/AF_XPort/AF_XPort.h
97
+ - lib/libraries/DS1307/DS1307.cpp
98
+ - lib/libraries/DS1307/DS1307.h
99
+ - lib/libraries/DS1307/keywords.txt
100
+ - lib/libraries/FrequencyTimer2/FrequencyTimer2.cpp
101
+ - lib/libraries/FrequencyTimer2/FrequencyTimer2.h
102
+ - lib/libraries/FrequencyTimer2/keywords.txt
103
+ - lib/libraries/I2CEEPROM/I2CEEPROM.cpp
104
+ - lib/libraries/I2CEEPROM/I2CEEPROM.h
105
+ - lib/libraries/I2CEEPROM/keywords.txt
106
+ - lib/libraries/LoopTimer/LoopTimer.cpp
107
+ - lib/libraries/LoopTimer/LoopTimer.h
108
+ - lib/libraries/LoopTimer/keywords.txt
109
+ - lib/libraries/OneWire/OneWire.cpp
110
+ - lib/libraries/OneWire/OneWire.h
111
+ - lib/libraries/OneWire/keywords.txt
112
+ - lib/libraries/OneWire/readme.txt
46
113
  - lib/libraries/SWSerLCDpa/SWSerLCDpa.cpp
47
114
  - lib/libraries/SWSerLCDpa/SWSerLCDpa.h
115
+ - lib/libraries/SWSerLCDsf/SWSerLCDsf.cpp
116
+ - lib/libraries/SWSerLCDsf/SWSerLCDsf.h
117
+ - lib/libraries/Servo/Servo.cpp
118
+ - lib/libraries/Servo/Servo.h
119
+ - lib/libraries/Stepper/Stepper.cpp
120
+ - lib/libraries/Stepper/Stepper.h
121
+ - lib/libraries/Stepper/keywords.txt
122
+ - lib/libraries/Wire/Wire.cpp
123
+ - lib/libraries/Wire/Wire.h
124
+ - lib/libraries/Wire/keywords.txt
125
+ - lib/libraries/Wire/twi.h
126
+ - lib/libraries/Wire/utility/twi.c
127
+ - lib/libraries/Wire/utility/twi.h
128
+ - lib/plugins/bitwise_ops.rb
129
+ - lib/plugins/blink.rb
130
+ - lib/plugins/blink_m.rb
131
+ - lib/plugins/debounce.rb
132
+ - lib/plugins/debug_output_to_lcd.rb
133
+ - lib/plugins/hysteresis.rb
134
+ - lib/plugins/input_output_state.rb
135
+ - lib/plugins/lcd_padding.rb
136
+ - lib/plugins/mem_test.rb
137
+ - lib/plugins/midi.rb
138
+ - lib/plugins/parallax_ping.rb
139
+ - lib/plugins/servo_pulse.rb
140
+ - lib/plugins/servo_setup.rb
141
+ - lib/plugins/smoother.rb
142
+ - lib/plugins/spark_fun_serial_lcd.rb
143
+ - lib/plugins/spectra_symbol.rb
144
+ - lib/plugins/twitter_connect.rb
48
145
  - lib/rad.rb
146
+ - lib/rad/README.rdoc
147
+ - lib/rad/arduino_plugin.rb
49
148
  - lib/rad/arduino_sketch.rb
149
+ - lib/rad/generators/makefile/makefile.erb
150
+ - lib/rad/generators/makefile/makefile.rb
151
+ - lib/rad/hardware_library.rb
50
152
  - lib/rad/init.rb
51
- - lib/rad/todo.txt
153
+ - lib/rad/rad_processor.rb
154
+ - lib/rad/rad_rewriter.rb
155
+ - lib/rad/rad_type_checker.rb
156
+ - lib/rad/sim/arduino_sketch.rb
157
+ - lib/rad/sketch_compiler.rb
52
158
  - lib/rad/tasks/build_and_make.rake
53
159
  - lib/rad/tasks/rad.rb
160
+ - lib/rad/todo.txt
161
+ - lib/rad/variable_processing.rb
54
162
  - lib/rad/version.rb
55
- - lib/rad/generators/makefile/makefile.erb
56
- - lib/rad/generators/makefile/makefile.rb
57
163
  - scripts/txt2html
58
164
  - setup.rb
59
- - spec/models/spec_helper.rb
165
+ - spec/examples/hello_world.rb
166
+ - spec/examples/serial_motor.rb
60
167
  - spec/models/arduino_sketch_spec.rb
168
+ - spec/models/sketch_compiler_spec.rb
169
+ - spec/models/spec_helper.rb
170
+ - spec/sim/hello_world_spec.rb
61
171
  - spec/spec.opts
172
+ - test/test_array_processing.rb
173
+ - test/test_plugin_loading.rb
174
+ - test/test_translation_post_processing.rb
175
+ - test/test_variable_processing.rb
62
176
  - website/index.html
63
177
  - website/index.txt
64
178
  - website/javascripts/rounded_corners_lite.inc.js
@@ -91,9 +205,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
205
  requirements: []
92
206
 
93
207
  rubyforge_project: rad
94
- rubygems_version: 1.1.0
208
+ rubygems_version: 1.2.0
95
209
  signing_key:
96
210
  specification_version: 2
97
211
  summary: A framework for programming the Arduino physcial computing platform using Ruby. RAD converts Ruby scripts written using a set of Rails-like conventions and helpers into C source code which can be compiled and run on the Arduino microcontroller.
98
- test_files: []
99
-
212
+ test_files:
213
+ - test/test_array_processing.rb
214
+ - test/test_plugin_loading.rb
215
+ - test/test_translation_post_processing.rb
216
+ - test/test_variable_processing.rb