Friday, September 16, 2016

Chapter 3: Projects 7 - 10

The Rest of the Projects from Chapter 3


Project 7: Pulsating Lamp

This one was pretty straight-forward. I guess Arduino doesn't have a built-in variable for pi, because the code had to type it out to the first four decimals.

Project 8: RGB Mood Lamp

This one seemed to work really slowly, and also seemed to get stuck on a particular color after a little while. I might have just been impatient, though. The book said to also use a piece of paper to help blend the colors, and I think it kind of helps.

Project 9: LED Fire Effect

This was a lot like the RGB mood lamp, except that the delay was randomized and made the LEDs seem to flicker.

Project 10: Serial-Controlled Mood Lamp

This was the only one that I had trouble with. The program seemed to acknowledge only the second and third values that I input to the serial monitor, and ignore the first.

For example, if I typed in r200, nothing would change. But if I typed in b127, r200, it would change the red LED to an intensity of 200, and do nothing to the blue. Similarly, if I typed r200, b127, g255, it would skip the red value, and change only the blue and green.

Otherwise, it seemed to work alright.

No comments:

Post a Comment