Activities/TurtleArt/Tutorials/Turtle Sensors Tutorial gci2012: Difference between revisions

Tonyforster (talk | contribs)
No edit summary
Tonyforster (talk | contribs)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Turtle Art with Sensors==
==Turtle Art with Sensors==
Created during Google Code In 2012 http://www.google-melange.com/gci/task/view/google/gci2012/7976214


===Introduction===
===Introduction===
Line 26: Line 27:
===Hands on Example: Graphing the Loudness of Your Voice===
===Hands on Example: Graphing the Loudness of Your Voice===
1. Start Turtle Art.
1. Start Turtle Art.
2. Put a pen up block, after start.
2. Put a pen up block, after start.
3. Then have a x/y block. In the x spot put a blue left block, which can be found under the screen symbol. In the y spot have a 0 block.
3. Then have a x/y block. In the x spot put a blue left block, which can be found under the screen symbol. In the y spot have a 0 block.
[[Image:TAportfolio.png|500px]]
4. A pen down block should follow.
4. A pen down block should follow.
5. Next comes the repeat block. Connect a width block to it. The width block is found under the screen symbol as well.
5. Next comes the repeat block. Connect a width block to it. The width block is found under the screen symbol as well.
6. Inside the repeat put another x/y block. In the x input connect a xcor block which can be found under the turtle. In the y input connect a loudness block that can be found under the wire symbol.
7. Then have a blank block. This block can be found under the repeat symbol.
8. Connect yet another x/y block. In the x input connect a + block. This block will be found under the 123+-= symbol.For the top value on the + block connect a xcor block. For the bottom value connect a number block with a 1.
9. For the y value on the x/y block connect s ycor block. Your blocks should look like this:


6. Inside the repeat put another x/y block. In the x input connect a xcor block which can be found under the turtle. In the y input connect a loudness
block that can be found under the wire symbol.


[[Image:TAsensors.png|500px]]


7. Then have a blank block. This block can be found under the repeat symbol.


[[Image:TAflow.png|500px]]


8. Connect yet another x/y block. In the x input connect a + block. This block will be found under the 123+-= symbol.For the top value on the + block connect a xcor block. For the bottom value connect a number block with a 1.


9. For the y value on the x/y block connect s ycor block. Your blocks should look like this:


10. Test your sensor. Hit start and talk to your computer. Your graph should look something like this:




Line 52: Line 59:




10. Test your sensor. Hit start and talk to your computer. Your graph should look something like this:


===How to Build a Sensor===
===How to Build a Sensor===
Line 74: Line 82:


1. Start Turtle Art.
1. Start Turtle Art.
2. Put the clean block right after start. This will clear the screen.
2. Put the clean block right after start. This will clear the screen.
3. Then put a right block with 90 for the angle.  
3. Then put a right block with 90 for the angle.  
4. Get the forever block from Flow Operators palette.
4. Get the forever block from Flow Operators palette.
5. Now attach a left 90 block.s
5. Now attach a left 90 block.s
6. Then connect a forward block. The forward block should be attached to a loudness block that is found under the wire symbol.  
6. Then connect a forward block. The forward block should be attached to a loudness block that is found under the wire symbol.  


 
[[Image:TAsensors.png|500px]]
 
 
 
 




Line 125: Line 134:
    
    


Sensors Applied
===Sensors Applied===
 
Modes
 


Voltage Mode
====Modes====


Resistance Mode
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Voltage_Mode Voltage Mode]


Pitch Mode
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Resistance_Mode Resistance Mode]


Sound Mode
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Pitch_Mode Pitch Mode]


Volume Mode
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Sound_Mode Sound Mode]


Measuring
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Volume_Mode Volume Mode]


Measuring Temperature
====Measuring====


Measuring Soil Moisture
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_Temperature Measuring Temperature]


Measuring Water Salinity
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_Soil_Moisture Measuring Soil Moisture]


Measuring AC Amps
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_Water_Salinity Measuring Water Salinity]


Measuring power
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_AC_Amps Measuring AC Amps]


Measuring DC Amps
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_power Measuring power]


Measuring Water Salinity
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_DC_Amps Measuring DC Amps]


Here are some interesting usages of sensors:
====Here are some interesting usages of sensors:====


Seismograph
[http://tonyforster.blogspot.com/2011/10/xo-175-seismograph.html Seismograph]


Graphing Pitch and Volume
[http://tonyforster.blogspot.com/2011/05/graphing-pitch-and-volume.html Graphing Pitch and Volume]