class FrequencyGenerator

Public Instance Methods

loop() click to toggle source
# File lib/examples/frequency_generator.rb, line 7
def loop
    uh_oh 4   
end
uh_oh(n) click to toggle source
# File lib/examples/frequency_generator.rb, line 11
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