Pocahontas, Our Cyborg Car
One of the first steps we took was using the number board (?) to see the numbers reported by the LED sensor. We found out that on the white line, the number was around 500-530, while the number for the cardboard was around 600. (The number for the edge of the white tape was 530-540.)
Julie, Julia, and I had a couple of different ideas on how Pocahontas could follow the white line. Our first idea was to have Pocahontas follow the right edge of the white tape then bear to the left whenever the car moved on to the cardboard. (The shape of the path was a hook, so we thought this would be possible.) However, we also thought of having Pocahontas "check" both directions (bearing right and left) to find the white line then move forward.
After hours of experimenting with the software, our program looked like this:
Our Pico Blocks Program
This program commanded Pocahontas to move forward if the LED sensor read numbers between 470 and 500. However, if it read some other number (higher numbers of the cardboard), the command was led to another "if then else" command. Here, if the LED sensor read greater than 500 (Pocahontas was on the cardboard), Pocahontas would bear to the left until the sensor read less than 500 (reached the white line), where it would then continue on forward. If the LED sensor read less than 500 (was on the white line) but kept moving to the left, then the command was for Pocahontas to bear to the right until it hit the white tape, where it would also continue on.
We also experimented with the motor power because Pocahontas was moving too fast or turning too fast before the LED sensor could read the reflection and the cyborg to process the numbers. So, we decreased the power of the motor (shown).
No comments:
Post a Comment