Lesson 8 - Embedded Programming



The fear from coding

Even though I am dealing with html coding every week,
this week was an introduction to the real thing...
and it was not an easy state of mind to adapt regarding to my constant visual working surrounding.
but at the end of the day..and after a lot of practice I believe that I might be able to program one day...
in the future..
.sometime...

Getting started

First, I had to install all the required drivers and software in order to create the initial communication with the board.
the task was to program an ATtiny44A microcontroller on our Button + LED board.
I have downloaded the ATtiny and Arduino software and support files.




I have also realized the numbers of the legs of the Atiny in arduino,
followed by a comparison table
so for examplePin number 6 In the Atiny microcontroller will be Pin number 7 on the Arduino and it will be considered as PWM-analog.

Restart and configuration

After installing the Arduino it was needed to restart and configure the board.
I have connected the ATiny to the FABIsp as the programmer.
later I connected the FTDI cable from the LED board to the computer.
I have configured the ATiny to run as 20MHz and selected my programmer as USBtinyISP.
And I was running the Burn Bootloader command, in order to prepare the microcontroller for programming.







Programming the LED board and Button

As an introduction to the programming I was using the samples from the Arduino library.
I have started with blinking the LED as changing the intervals of the timer - as on and off - 0 and 1 and the time it is blinking determine by intervals of milliseconds.








Later on I have opened theButton sample from the library and created an analog PWM that creates fade IN and fade out effect to the LED.




For fun...

After playing for a while we were thinking to create a stand for the board.
We have laser cut a Plexiglas frame for the LED, and engraved the FABLABIL text on it,
The idea was that the text will glow...
But I guess the LED is not strong enough and the "light guide" we have created is not covering well the LED.
so a lot of light spread outside of the light guide...but it was a nice try!