Wednesday, February 12, 2014

day 12 maze




Competition day  at Long Beach

While the Arena was being set up, my team had a few hours to calibrate and fix any last minute issues.
While testing everything seemed normal turns where off like they are every fifteen minutes as we already expected. But something unexpected occurred, our turns stop working.  I contemplated forfeiting the competition.  The motor speed of the turn was set at 80, so we thought there was a problem with the motors. We ended up not being about to figure fix it and set the motor speed to 120. The video below shows our best trail.

day 11 ultrasonic






Ultrasonic Sensor
The Ultrasonic Sensor is a transducer, it can send and receive signals. By sending a signal it can count how long it takes for the signal to come back. The time it takes for the signal to come back multiplied by the speed of sound is the distance.




To enhance the robot I am now able to stop a curtain distance from the walls instead of hitting them. Here is an example of such code.

day 10 encoders

Encoders
Encoder have ticks, while the wheel spins the tick values on the encoders increase. In stead of moving our robot with delays, we can set a tick value for how much it will move. For example, until 100 tick occur move forward. 

To build further on this we can calculate how many tick values moves forward an inch. Once we have that tick value to move forward 12 inches, you only need to multiply that tick value by 12.


day 9 maze

Maze with encoders.
Going through this maze a second time but with encoders. The encoders made the code shorter, by having a function that drives forward based on tick values and turns with preset tick values, all i had to do in the main task was call the function and type the parameter.

day 8 flame sensor and vexduino

Flame Sensor 
The flame sensor is able to see infrared, meaning if there is a flame around it will be about to detect it.
Using Serial begin command on the Arduino, we are able to see the infrared values in real time. By first comparing the ambient room temperature  number to putting a flame in front of it, you can dial in on a number to sense when it is in front of the flame.




Now that i know when the robot can see the flame i can set a step of commands on how to extinguish it.




day 7 sensors using arduino



Using the Arduinos' serial debug, external input can be extrapolated as data.
In this image a LDR is pluged in as a analog input to the arduino. The LDR's voltage is changing depending on how much light is around it. The higher the light the less the resistance, thus the arduino is reading a higher number.

The Arduino has a Serial begin   command that allows you to see the data it is reading in real time. Depending on the voltage it receives it gives a number between 0 and 1023.


Tuesday, February 11, 2014

day 5

Hacking a toy. The chosen toy has a motor that is activated  by an external input. 
In order to use the arduino I cut the wires  from the old micro controller. 



 Once the old controller was out i had to extend the wires in order to have enough room to connect onto the arduino board.