iBox III Programmed to Never Fall From Table and Stay Away From Walls...
All you need is


2x IR Reflectors
1x Distance Sensor
2x DC Motors1x iBox III Microcontroller
This is very simple program following commands will do this all.
This is very simple program following commands will do this all.
startto alertbeependto startwait 100ab, setpower 8loop [ if (( sensor 0) > 300and ((sensor 1) > 300 ))[ ab, thisway ab, on ]if ((sensor 2) > 300)[alertab, thatway ab, onfor 150a, thisway a, onfor 50a, thatwayab, on]if ((sensor 0) <>[alertab, thatway ab, onfor 150a, thisway a, onfor 50a, thatwayab, on]if ((sensor 1) <>[alertab, thatway ab, onfor 150b, thisway b, onfor 50b, thatwayab, on] ]if ((sensor 3) > 850)[alertab, thatway ab, onfor 150a, thisway a, onfor 50a, thatwayab, on]]end
Please note this programme will handle both 1)Never fall from table 2) Never collide with Walls.
You can add further funcaitonlity in this program for example add a light sensor and then you can program to start moving is light is on and stop when light is off, things like this.
No comments:
Post a Comment