Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Regis
After I made my presentation of our new LEGO WeDo robotics kits to the 5th graders, the
students were asked to submit questions about robotics or drawings of what theyd like
to make. Here are my answers:
This code tells the robot to move forward when something passes in
front of the sensor.
This is a similar bit of code built in the Python scripting language. Keep in
mind that this is only a small part of the code:
import RPi.GPIO as GPIO
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(3, GPIO.IN) #Right sensor connection
GPIO.setup(16, GPIO.IN, pull_up_down=GPIO.PUD_UP) #Left sensor connection
while True:
i=GPIO.input(3) #Reading output of right IR sensor
j=GPIO.input(16) #Reading output of left IR sensor
if i==0: #Right IR sensor detects an object
print "Obstacle detected on Left",i
time.sleep(0.1)
elif j==0: #Left IR sensor detects an object
print "Obstacle detected on Right",j
time.sleep(0.1)
How can you make the robot speak?
With the robotics kits we have at school, you can record sounds and voices. To get the
robot to speak, you would have to create a program that would make the robot use the file
you recorded.
Can you make a robot flip and do twirls?
Im not sure about making these particular robots do flips and twirls; while we have a lot of
parts in the kit, and many commands that we can utilize, Im not sure they would have that
capability. We would have to try it out and see!
How much will it cost to get in?
That will all depend on many factors: will the students be given supplies that they can keep?
Will we have to purchase software licenses? Since we are in the early planning stages, not
many things have been definitively decided.