fabacademy

FAB ACADEMY 2017 / WIM LANZ

Mar 15: embedded programming


This weeks task where to program the echo-helloworld board we did in the electronics design week. We programmed the board on Arduino IDE which was by no the easiest coding language to get started with it.

Fablab

Read a microcontroller datasheet


At first I started to read the microcontroller datasheet. It is really helpful to read it because of the pin configurations and also to have an overview how the different microcontrollers work.

Fablab

Program the ATtiny44 with Arduino IDE


Next step was to program the echoworld /attiny44 board with the Arduino IDE. After that you need to load the attiny package into the arduino board manager, because it is not by default in the manager. For that go to Arduino "preferences" and decide the location where you want your codes to be saved. Then you can go to “additional boards manager urls” and paste the following url: "https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json". Be sure if you loaded already other packages to make a comma between the urls. Then just save the preferences. Next step is to go to "tools", "board", "boards manager", scroll down until you find the attiny and install it. After that you see its "installed". Then go to "tools", "board" and select the attiny. Then select the "processor" which is at my example also the attiny44, select the "clock" 20MHz external and the "programmer" which I first used the AVRISP mkII and after everything worked I programmed it with my own usbtinyisp. Sometimes it doesn't showed me my "port" for the usbtinyisp so I had to restart my computer and after that it worked perfectly. Next step was to put both boards together. I already made the 6 pin cable so it was an easy task. Just always remember where your ground is on the board when you connect it. Now go back to the Arduino IDE, "tools", "burn bootloader". If it works it will say "Done uploading" and your code should be on the board. It doesn't worked from the beginning so I had to solder my board a little bit better. Then it worked like a charm. And remember that you need to change the code connected to the attiny pin 6, so in Arduino it was the pin 7. I found this useful diagramm which explains the equivalence between pins in attiny and Arduino boards. I started with basic programming script which are already loaded into the Arduino IDE. In this example it was the "Blink" code that I adapted a little pit. Also tested a lot of different codes and adapted it.

Fablab Fablab Fablab Fablab Fablab Fablab Fablab Fablab Fablab Fablab

Tutorial with the Arduino boards


We also had a small introduction to Arduino and coding in ccode. I started last year with the basic design kit from Arduino but it was good to repeat the program to get back to coding. We made different codes and also changed stuff and just getting used to the interface and the different coding languages. In the video you see a fade code where we connected the Arduino to the breadboard combined with a led. We also made different stuff with buttons, etc.


Starting to programm codes in XCode and cc+


I started to look in to cc+ programming on xcode and already made a small code to see the "hello world" written. I am eager to learn more programming in cc+ which I can use in the next week group assignment where we want to build a robotic arm.

Fablab

10 years anniversary fablab bcn and progress on my pingpong table


Last but not least we had the 10 year anniversary from the fablab barcelona. I made a lot of progress on my pingpong table. I milled the last three tables on the shopbot. One table in the greenlab and two tables in the fablab. Getting really good at using the shopbots and found out that the motor for the drillbit on the shopbot in the fablab was a lot more powerful, like 6 horsepowers, where the one in the greenlab just has 1 horsepower. You really saw that it was a lot more powerful in the milling process. For now I used already four sheets of 15mm wood and like four hours already time on the milling machine. Still need to make four plates more and the missing connections for the legs. Of course the pingpong table was the hero of the anniversary like you see in the pictures. It's still not finished but all the people already played on it. Success!

Fablab Fablab Fablab Fablab Fablab Click here to download all the files.