Embedded Programming



This week, I made a blink echo borad

This week, I modify the exiting echo board, which I made two weeks ago. I started with a blinking LED. Julia Elbert's blink code and documentation was an excellent reference for modifying 'hello.ftdi.44.echo.c'.






Step1: Blink

Blink LED forever
blink.c

It simply turn on and off led light endlessly.





Step2: Button LED On

If press button, turn on or off the LED
buttonLEDon.c


Now the board gets button input as switch of led light.






Step3: Button Blink

If press button, turn on or off the LED. However while it is pressed blink faster.
buttonblink.c


Still the button worked as switch, while it is pressed it blinks. It could be the signal of whether the button is pressed.






Step4: Button Echo

If pressed, count button pressed seconds. If released, wait 2 seconds, and light LED the same amount of time that button pressed.
buttonecho.c


It recorad the length of time the button is pressed. I created on variable "button_pressed_length" that increase while it is pressed and dcrease while it is release. If the value of it is 0, nothing happen.



END