Monday, May 28, 2012

Week 8 Update

For this week's lab, we succeeded in getting the arduino to log data when a button is pushed.

To set up the breadboard for the LED/button setup, we followed this tutorial.

To indicate the data is logging, Kevin incorporated a mini, LED red light.

Afterwards the coding from Read Analog Voltage Tutorial was combined with the coding obtained from above to have the Arduino do the following steps:

1. Light the LED
2. Obtain analog signal from Potentiometer and display the information on to the computer in the format of "TIME, VOLTAGE.
3. When the button is pressed again, the LED turns off, and the Arduino stops. The millis () time function will also pause.

Afterwards, a magnet took the place of the button as the switch. This was done in the hopes that another magnet would be attached to the wheel of the solar car, and this way, speed could be measured via frequency.

Problems encountered: In trying to combine the "toggle_log_on_off" code with the micro SD writing delay, the button function stopped working. The LED would not light up, and the Arduino would not obtain the signal from the potentiometer.

No comments:

Post a Comment