Activities/Turtle Art/Using Turtle Art Sensors: Difference between revisions
Tonyforster (talk | contribs) |
Tonyforster (talk | contribs) |
||
| Line 473: | Line 473: | ||
The doorbell, remote doorbell and Teletype show how to use the Python block [[File:Pythoncodeblock.jpg|40px]]to generate an audio tone in Turtle Art. | The doorbell, remote doorbell and Teletype show how to use the Python block [[File:Pythoncodeblock.jpg|40px]]to generate an audio tone in Turtle Art. | ||
def myblock(lc, x): | |||
import os | |||
os.system('speaker-test -t sine -l 1 -f %d' % (int(x))) | |||
The volume level can be amplified with a CD or tape player or amplified PC speakers. This can be used for resonance experiments including Chladni plates, [http://www.youtube.com/watch?v=NWRq0KiAzuU] or [http://sites.google.com/site/solymar1fisica/fisica-con-xo-investigacion-/Chladni.3gp] and [http://www.youtube.com/watch?v=ntk5raVQvQY rings] and also for experiments involving beat frequencies and interference patterns. | The volume level can be amplified with a CD or tape player or amplified PC speakers. This can be used for resonance experiments including Chladni plates, [http://www.youtube.com/watch?v=NWRq0KiAzuU] or [http://sites.google.com/site/solymar1fisica/fisica-con-xo-investigacion-/Chladni.3gp] and [http://www.youtube.com/watch?v=ntk5raVQvQY rings] and also for experiments involving beat frequencies and interference patterns. | ||