so i made my first robot! had a lot of hurdles during the process, just trial and error. But after finishing my goal i have a lot of questions. But first the parts I used.
http://www.radioshack.com/make-it-robotics-starter-kit/2770168.html#.VMsCVmjF91g
I've heard a lot of people say this is an expensive kit but it had everything i was looking for in one box at a radioshack i was checking out. Comes with
2 infrared light sensors that I couldn't figure out how to use beyond knowing if an object was white or black using the library that came with it.
a motor shield that i think i might need a different one perhaps? better? because of an issue im having.
2 wheels and 2 motors and 1 roll along the ground third wheel thing like a mouse trackball
some batteries
some other stuff but thats the important part.
I also bought this ultrasonic sensor, thought it was a pretty dang good way to detect collisions.
This things actually very awesome, it can tell the distance to my ceiling or far wall and farther really accurately. I just check for 2 inch distance and activate collision.
http://www.radioshack.com/radioshack-ultrasonic-range-sensor/2760342.html#.VMsR4mjF91g
I also scavenged two 4 ohm speakers that are in line with eachother so i assume they were equal to one single 8 ohm speaker and used the proper resister for that calculation. I can play 8 bit sounds through these and have a few short songs it plays like part of the mario theme.
and lastly an infrared receiver that i took from an airhogs remote control helicopter i had. It properly receives ir codes and a library i have helps me decode it and do actions.
So the robot works autonomously and that was my goal in putting this all together. It moves forward and if it detects collision then it turns left. I can also control it myself with my samsung tv remote or my android phone that has a tv remote app that i use for the same tv (same codes) but i can program any ir codes to work with the robot.
My problems with my robot so far.
it seems unable to move forward and use the ultrasonic sensor at the same time, I'm hoping this is just a program error on my end. To get around this setback that i hope is not an incompatability with parts, I simply move the robot forward for one second then power down the motors and wait long enough for the ultrasonic to get its turn and get the distance reading, then decide if it should move for a second forward or for a second to the left if a collision is detected, repeat.
I think it would be a lot easier to use the motors and the ultrasonic sensors at the same time, its a lot less jerky.
The robot sees in pretty much a straight line forward which is a setback of the ultrasonic sensors without sweeping, and my current method of autonamousy for the robot gets it stuck on objects it cant see on the sides of it.
What details can I give you guys to help me maybe find the answer to some of these issues.
I'll post the full code but my labtop overheated earlier and i lost about an hour of code which got me my finished product intelligence. I'll redo that and post what I have. I'll post pics too.