Week 9: Output Device

PART I | Milling and Making

  1. milling

    This week we are supposed to incoporate an output device on our board.

    For my final, I want to do a light timer, so I went with the RGB LED light this week as an output device.

    I used Neil's board as a first attempt to test out the effect of this RGB LED, but later I will add a botton to control the initiation of the light-timer.

    I downloaded the png files for trace and outline, then I cut it on the destop cnc in CBA electronic shop.

    I also picked all the electronic parts out, preparing to solder.

  2. making

    With the help of solderring flux, I made the board. (My soldering skill is getting a lot better, no need to trouble-shoot the board anymore!)

PART II | Programming and Testing

  1. programming

    The first step is to download all the files from the website, including the c file and make file.

    Because it is an output device, it need a seperate power supply. So I connected a 9V battery (there's a regulator on the board, which handles a max of 35V power supply).

    I connected the avr programmer to the ISP head on the board. The light on the avr turned green, yeah!

    Time to program! Again, I just followed the same tutorial for the embedded programming week.

    sudo make -f hello.RGB.45.make program-avrisp2

    The LED lighted up and started to change color from red to green to blue.

  2. more programming

    I want the LED to have only two colors (red and green) and transform from one to the other over a set period of time (like a timer/hourglass).

    So I edited the c code file. I changed the order of the color and delete one routine of red to blue. I also changed the delay time to 10s.

    However, there seems to be something wrong with my code, and the programmer cannot properly program the LED.