Activities/Turtle Art/Using Turtle Art Sensors: Difference between revisions

Tonyforster (talk | contribs)
Tonyforster (talk | contribs)
Line 515: Line 515:
The Python Code Block [[File:Pythoncodeblock.jpg|50px]] is used to sound a tone in the loudspeaker, the pitch identifies the key pressed.  
The Python Code Block [[File:Pythoncodeblock.jpg|50px]] is used to sound a tone in the loudspeaker, the pitch identifies the key pressed.  


You need to type the following into Pippy and save to the Journal. Type it exactly as shown, the indents on the last 3 lines are important, for the characters '-l 1' the first is an 'el' and the second a 'one'. Click on the Python block to load the code.
The following code is now a built in sample, <i>sinewave.py</i>. If typing it in, the indents are important. Click on the Python block to load the code.


[[File:2tone python.jpg]]
[[File:2tone python.jpg]]