Sha256: 021858e20e927fe1c6b5d050f2572cd604d3289dadd7e97c5e9c15dd403b74df
Contents?: true
Size: 982 Bytes
Versions: 9
Compression:
Stored size: 982 Bytes
Contents
class FrequencyGenerator < ArduinoSketch # IMPORTANT -- This is one for four examples that fails with Ruby 1.9 support (latest ruby2c and parsetree) # the failing example is commented out and replaced with this hello world until I have a chance to resolve the issue -- jd output_pin 13, :as => :led def loop blink led, 100 x = 4 end # need explaination # output_pin 11, :as => :myTone, :device => :freq_out, :frequency => 100 # # def loop # uh_oh 4 # end # # def uh_oh(n) # # # n.times do # myTone.enable # myTone.set_frequency 1800 # delay 500 # myTone.disable # delay 100 # myTone.enable # myTone.set_frequency 1800 # delay 800 # myTone.enable # end # # hack to help translator guess that n is an int # f = n + 0 # end end
Version data entries
9 entries across 9 versions & 1 rubygems