We know how to control our 2 motors in both directions and we also know how to use our Phototransistors to detect if an object is close, now we put both of these together to form our robot. In this part we focus more on producing the code as we’ve already put our robot together as below.
Tag Archive 'wall'
So we’ve got our robot moving in different directions and now we need it to move to the directions we want which is away from walls. We do this using Phototransistors which is sort of similar to a Light Dependent Resistor (a component that changes resistance due to lighting) except Phototransistors actually use infra-red and have two components, the emitter and detector. The emitter well emits the infra-red (which we can’t see) and the detector detects how much of that infra-red is coming back.
So I’m very interested in electronics again and I bought the Arduino Starter Kit from a supplier in Australia and I’ve been testing it out a bit. I also bought an 16×2 LCD, a 8×8 LED Matrix and some other parts too.
I’m always trying to make games out of everything so naturally I started thinking of games that can be made using the LCD and came up with a car type game which you try to avoid walls and shoot enemies blocking your path. This game would be better if you have a 20×4 LCD as just having 2 positions to change to is kind of limiting the game experience.
LCD Road Runner
v0.1 (10 April 2010) – Initial Release with 10 levels