Prop Bot
tavedroid
Posts: 2
I have a propeller bot configured on a Boe Bot chassis and I'm using a Ping sensor to navigate the unit. I need to add more sensors to the unit because it runs up the side of the walls when it is moving diagonally down a hallway. I have ir sensors and I have whiskers. Can someone show me with spin code how I would achieve using these sensors with my Prop Bot.
Comments
There should be some code to use IR sensors in the OBEX.
As for the wiskers, I presume they are attached to microswitches.
Connect the switch between a spare prop pin and ground and connect a ~10K pullup resistor from the prop pin to +3V3. The switch will be NO (normally open). In spin you will be reading the prop pin to see if it goes to "0" meaning the wisker is tripped. Otherwise it will read a "1".
In spin you will use something like...
If INA[27] == 0
'... do something if port pin P27 is 0 (switch is active)
Then it slowly creeps up on You, increasing with each time the BOT gets wedged under the fridge..
Cringing every time the BOT gets close to a chair or table, knowing it will get lost in the forest of legs...
Thats when You find Yourself Wondering...why Me??..and how can I fix this??
Run away before it's to late...
You will save a fortune and Your sanity..
If You insist on more punishment for Yourself.check out the OBEX for all Your sensor code need's..
@clusso, the "wiskers" are actually the microswitch, as opposed to being attached to a microswitch..
Pretty clever setup, it's kinda what I did in the picture (in theory), cept I use a 74HC165..