Embedded programming

This week assignment was to make some practice with different programming languages.
It's been very useful indeed, especially starting from the reading of the ATtiny44A's data sheet, in order to understand how each microcontroller's pin does work.

The programming test was made with Arduino/Genuino's software (IDE).[https://www.arduino.cc]
This way, it was necessary to understand the ATtiny's Pin-Outs based on Arduino's configuration.
For a start, it is necessary to download the Attiny's library into the Arduino's hardware folder to program the "HelloBoard" with Arduino's IDE.
Now the Attiny should be selectable from the Tool’s dropdown menu.
Here below you can find the settings I used to program my HelloBoard with a 20Hz resonator, and the forward steps:

Board "ATtiny"
Processor:"ATtint44"
Clock: "20 MHz (external)"
Programmer: "USBtinyISP"

- Set fuses with "Burn Bootloader" or add the following code into the sketch:
CLKPR = (1 << CLKPCE);
CLKPR = (0 << CLKPS3) | (0 << CLKPS2) | (0 << CLKPS1) | (0 << CLKPS0);

- Upload Button Example
- Change Button an Led pin based on the ATtiny44A
const int buttonPin = 8;
const int ledPin= 7;
- Upload the sketch using "Upload Using Programmer" command.

On the basis of [Gabriel Tanner’s work] , a last year FabAcademy's student, I tried to set up a serial comunication between the HelloBoard and the Arduino software.
I uploaded Gabriel's code without any changes, because we both had the same Led's pin number.
Here the [code]

At the end, I approached the C programming for the first time.
To get to know this programming language, I first followed this tutorial and downloaded a precompiled program made up of a folder with two files within: the Makefile, which is used to automate the programming, and the file [hello.ftdi.44.echo.c], which is the actual program.

The first step was the setting up of the Attiny fuse, and, thanks to Andrea, I understood how to calculate the correct values of the fuse. We just added the CKOUT (Clock Output Enable), and then the low value into the makefile.
After doing that, I run the program through the terminal typing the following command lines:

make
make program-usbtiny-fuses
sudo make program-usbtiny