Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] <

To: <mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: touch sensors programming
From: "Alain Tougas" <alain@xxxxxxx>
Date: Wed, 9 Jan 2008 14:30:54 -0500

HI!

No sure I understand every element of your context but here's a few clues 
based on what I understand/guess. Assuming you're doing robotics using 
MicroWorlds EX Robotics.

Instead of sending the sensor value to MW (and print it is a text box), use 
the sensor value directly within the robot.

to drive
athisway
cthatway
aon
con
loop [checksensors]
end

to checksensors
if switch1 [ard]
waituntil [not switch1]
ard
if switch2 [crd]
waituntil [not switch2]
crd
end

If you need more info, write back!

AT

 -----Original Message-----
From: 	mwforum-admin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx [mailto:mwforum-admin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx]  On Behalf Of Dawn Young
Sent:	Wednesday, January 09, 2008 2:13 PM
To:	help MW
Subject:	touch sensors programming

Hello forum,

I am working with 6th graders in Binghamton NY. They have been
programming vehicles to execute basic procedures (forward, backward,
avoiding obstacles) and we are trying to add to our programming by using
a touch sensor.

Students have created a text box and can recieve a value from the
sensor 0 or 1

We cannot seem to get the vehicle to respond based on the value it
reads from the sensor. We have tried to write the procedure
If text1=0 then go
if text1=1 then stop
to go
//a procedure to make the vehicle go forward
to stop
//a procedure to stop the motors moving
How do I continually check the value of the sensor to make sure the
right procedure is launched?

Thank you,
Dawn Young
Challenge Enrichment Specialist
West Middle School
Binghamton City School District






  • Previous by thread: touch sensors programming

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.


    © copyright 2001 - 2008