openobject.org

Final Project 3

From Physical Programming

For the next step, we want to make an array of LEDs. For curtain temperature, the LED turn on one by one. That’s what we want to do. But after a lot of trial, we still can’t get it right. Image:pic17.jpg

Image:pic18.jpg Image:pic19.jpg


Only one LED is on. Image:pic20.jpg

After reading the Audrino web site, the Loop article, we finally get all the lights on. Image:pic21.jpg


Image:pic22.jpg



Then, we move on to explore the fade in and fade out function of Audrino.

As the fading function will only work for the PWM pins - digital pins 5, 6, 9, 10 and 11, we located the LEDs on both sides.

Aftter that, we realized that we could make use of this special allocation of LEDs. We use one set of LEDs to represent on/off status of the device, and the other set to indicate temperature changes.

Image:pic23.jpg

We input the following code to do the fading.

Image:pic24.jpg

And we input the following code to turn Digital pin 5and 6 on when it senses the temperature goes above 28 Celsius.

Image:pic25.jpg