Programe for Ligth and sound Sensor
Page 1 of 1

Author:  iftikhar [ Mon Jun 16, 2008 8:12 am ]
Post subject:  Programe for Ligth and sound Sensor

Hello every body,

I am attempting to write a sensors programe for my NXT robot.I need your help if any body send me code..for example i have a board in which my robot run, i put white paper also in some where that light sensor sence, when my robot reach at white paper and sound occur as same its become dangerous area for my robot. so when light sensor sence the white part and sound sensor detect the sound by using both sensors..if sound not occur then its not dangerous for robot so robot can move on white part but still dangerous as sound appears..please help me regarding this..i am using robotc. thanks in advance..

Author:  nxt [ Tue Jun 17, 2008 1:40 pm ]
Post subject: 

What do you want your robot to do when there is no danger, when it has to be alert and when there is danger?

Author:  Ford Prefect [ Sun Jun 29, 2008 5:23 am ]
Post subject: 

your question reminds me on a YouTube video where a robot has been trained not to be scared if a 2nd big robot appears in his environment...

I'll suggest to write a subsumption program with at least 2 elementary behavior routines:
cruise() // dark surface or sound: drive around, whistle a happy song
scared() // white surface, but no sound : stop, squeeze, turn, toggle and go back

maybe you'll need a 3rd behavior
avoid() // to avoid obstacles

a 4th behavior
escape() // searching his dark and save home as quick as possible, his heart bumping quick and loud

a 5th behavior
cooldown() // staying at home in a dark corner and waiting until becoming calm

and maybe you'll need a 6th behavior
cautious() // is already a little accustomed to the white surface or not quite sure about that: slow down, listen, look a little to the left and right side

if you want to train your robot to subsequently loose his initial fear of an unknown environment if a sound signal appears, in this case you'll wish to combine cautious() and scared() with a neural net.

I'm actually not sure if you are a more advanced programmer - if you're not, I'll suggest not to try this, I'm afraid this project will lead to a big frustration... :?

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group