Laboratory 3 – Arduino : second part

For this third laboratory, we worked on the Arduino for more practice. After having connected the Arduino and the computer by the serial port, we went through some practical exercises. The first exercise consisted in a circuit including a logical switch whose position connects the card input to 5 volts or to the ground. To visualize the state of the input on the computer, we set the communication with Serial.begin(9600) and added a Serial.println(state), the variable “state” containing a value (1 or 0) depending on the tension applied on the input.

Then we changed the switch by a pushbutton. The difference is that the pushbutton does not provide a stable input as it comes back in its initial state once you do not put any pressure on it. The electronic circuit is a bit different but the trickiest part was to use it as a pushbutton must be used.

Finally, we used a temperature sensor as an input and a small program, considering the sensor data, to display the temperature on the computer screen. The first of the last two exercises involved the use of a potentiometer to represent a 0-5volts scale by 0-1 on the display. The second involved the use of five LEDs, to reincarnate the 1980’s slowest Trans Am ever made, by switching them sequentially on and off using delays.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s