Activities/TurtleArt/Tutorials/Turtle Sensors Tutorial gci2012: Difference between revisions
Tonyforster (talk | contribs) Created page with "Turtle Art with Sensors Introduction Sensors are used to measure the temperature, soil moisture, water salinity, AC/DC amps, etc. Sensors also have different modes. Some of ..." |
Tonyforster (talk | contribs) |
||
| (16 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=== | ||
Sensors are used to measure the temperature, soil moisture, water salinity, AC/DC amps, etc. Sensors also have different modes. Some of the modes include, voltage mode, resistance mode, pitch mode etc. Sensors are used to build interesting things some examples are carbon microphones, doorbells/ burglar alarms, photovoltaic panels, etc. Sensors are also used to connect to microscopes, telescopes, and many, many more things. All these sensors can be accessed through Turtle Art. | Sensors are used to measure the temperature, soil moisture, water salinity, AC/DC amps, etc. Sensors also have different modes. Some of the modes include, voltage mode, resistance mode, pitch mode etc. Sensors are used to build interesting things some examples are carbon microphones, doorbells/ burglar alarms, photovoltaic panels, etc. Sensors are also used to connect to microscopes, telescopes, and many, many more things. All these sensors can be accessed through Turtle Art. | ||
Types of Sensors | ===Types of Sensors=== | ||
Humidity Sensor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Humidity_Sensor | Humidity Sensor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Humidity_Sensor | ||
Construir Sensor Luz http://wiki.laptop.org/go/Making_XO_sensors/Construir_Sensor_Luz | Construir Sensor Luz http://wiki.laptop.org/go/Making_XO_sensors/Construir_Sensor_Luz | ||
Lichtsensor http://wiki.laptop.org/go/Making_XO_sensors/Lichtsensor | Lichtsensor http://wiki.laptop.org/go/Making_XO_sensors/Lichtsensor | ||
Light Sensor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Light_Sensor | Light Sensor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Light_Sensor | ||
Magnetic Sensor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Magnetic_Sensor | Magnetic Sensor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Magnetic_Sensor | ||
Switch Sensor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Switch_Sensor | Switch Sensor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Switch_Sensor | ||
Temperature Sensor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Temperature_Sensor | Temperature Sensor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Temperature_Sensor | ||
Thermistor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Thermistor | Thermistor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Thermistor | ||
Accelerometer http://wiki.laptop.org/go/Accelerometer | Accelerometer http://wiki.laptop.org/go/Accelerometer | ||
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. | |||
[[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: | |||
| Line 41: | 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 | |||
Temperature Sensor | Temperature Sensor | ||
| Line 65: | 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]] | |||
7. Then add a right 270 block, followed by a forward loudness block. The end result should look like this: | |||
8. Test your sensor. To test it click start and speak. The turtle should run all over the place, graphing your voice. Note how the turtle makes a longer line when your voice is louder. Your screen should look something like this when you are done testing it. | |||
| Line 80: | Line 111: | ||
| Line 100: | Line 129: | ||
Scientific Sensor Application | |||
You can use a LDR or Light Dependant Resistor to measure your pulse. A LDR is a sensor because it senses light and uses it to work. You will have to put a Cartesian block after the start block. Then connect a forever block, followed by a clean block. Connect a pen up block, followed by an x/y block. For the x input you will need a –600 block, in the y input you will need a 0 block. Then connect a pen down block, followed by a repeat block. The repeat block should be connected to a 1200 block. After the repeat block should be an x/y block. For the x input you should have a + block. Connect the top of the + block to an xcor, connect the bottom to a 1 block. For the y input you should have a – block. Connect the top of the – block to a resistance block. The bottom should be connected to a 3000 block. To test your sensor, cover the LDR with your fingertip and hold near a bright light. Your test should look something like this: | |||
===Sensors Applied=== | |||
====Modes==== | |||
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Voltage_Mode Voltage Mode] | |||
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Resistance_Mode Resistance Mode] | |||
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Pitch_Mode Pitch Mode] | |||
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Sound_Mode Sound Mode] | |||
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Volume_Mode Volume Mode] | |||
====Measuring==== | |||
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_Temperature Measuring Temperature] | |||
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_Soil_Moisture Measuring Soil Moisture] | |||
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_Water_Salinity Measuring Water Salinity] | |||
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_AC_Amps Measuring AC Amps] | |||
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_power Measuring power] | |||
[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:==== | |||
[http://tonyforster.blogspot.com/2011/10/xo-175-seismograph.html Seismograph] | |||
[http://tonyforster.blogspot.com/2011/05/graphing-pitch-and-volume.html Graphing Pitch and Volume] | |||
Graphing Pitch and Volume | |||