07_EMBEDDED PROGRAMMING

josefinaPETRINI

_EMBEDDED PROGRAMMING

For this week I learned how to program a redesigned HelloBoard, using my FabISP done in the electronics design assignament as programmer and the Arduino IDE. To start, I made sure my new board was working by:

Downloading Arduino IDE Software.

Then, I download the ATtiny support for Arduino, this means, downloading the board files so the Arduino can talk to the ATtiny44A microcontroller in my HelloBoard. The files were taken from FabAacademy tutorials and copied the attiny folder into the Arduino "Hardware" folder.

Before setting the Arduino tools, I had to download a UBSTiny Driver for Arduino to read the board as I am working on Windows OS from Adafruit.

Once in Arduino menu, comes the Tool setting:

  • Tools + Board + ATtiny
  • Tools + Clock + 20MHz
  • Tools + Processor + ATtiny44A
  • Tools + Programmer + USBtinyISP
  • Finally, Tools + Burn Bootloader
  •        

    _Programming ATtiny44 microcontroller

    To program the ATtiny44 microcontroller in the HelloBoard, I used one of the Arduino "Examples"; in this case the Blink

     

    This example gives us the possibility to change wether we want the blink to be a digitalWrite o analogWrite output, and the delay in ms of the blinking of the led.

  • Also, we have to assign the corresponding pin of the ATtiny to the PinMode: 7 in this case.
  • Finally, upload your code by clicking on the Upload button.
  •    
  • The LedLight started blinking!!
  •  

    The second time I plugged my HelloBoard to program it, I broke the FTDI header. So, I tried to fix it by adding cables just to the VCC and GND circuits, as I wasnt using the rest of the pins from this board. This was just for the board to get power. I used cables instead of hot glue because it was not going to work as a lot of the copper wires were broken. When I plugged it, the board was actually was getting power, BUT the LED was not on, so the next step was using the voltimeter to check the volts of each path. The LED was getting 5v, so I thought it might be the Led itself. Changing it was the fina step, but I couldn't manage to make it work.

     

    _More of Arduino

    There is also a very useful program called Fritzing, a software to learn to use electronics. As I dont have any Arduino Boards yet, I have started using Fritzing to learn more about electronics and experiment.

         

    Another example: using the speaker, by copying the code from the Arduino Examples.

       

    Finally, I added a photovoltaic sensor:

       

    TROUBLESHOOTING

  • Arduino and Windows OS: Arduino won´t be able to read the Echo Hello-World Board if a UBSTiny Driver isn´t downloaded and setted in the Arduino menu.
  • If you manage to break any of the components from the board, connecting cables is s good option to attach them again.
  • CODES

    Blink example code