Skip to content

8. Embedded programming

Ending very frustrated last week, beginning frustrated this week: I contracted covid and have been in isolation for a few days now. Focus is not easy, especially not for a subject as abstract as programming. I followed Erwin’s instruction from home,erwinfromhome but I must say much of it is a dialect of Chinese to me. The very basics I can see, of how you’d need a language, and how computers ‘think’; appropriation of all that is a distant mountaintop. Exciting territory, still.

group assignment

I could not participate because of covid. Possibly I will try stuff on my own (Erwin at my request provided me with a nice shoppinglist for breadboards etc)

I read a couple of previous years’ peers documentation pages, read things on the Arduino site and then watched Aalto Fablab’s tutorial. aaltoembedded Then I sunk my teeth into this Xtreme 500 page datasheet of the ATTINY412 I am using - and I learned from it how there are many configurations possible, but still not really grasping how to make them my own. I also joined the Global Open Time, and from that especially this drawing was helpful. drawing

What I take from all of that is that I seem to have succesfully designed (half-copied) a PCB with an ATTINY412, a button, a phototransistor and an LED; this board seems in working order since the LED flashes,

and it also echoes.echo

Earlier on I also soldered an FTDI, and some more boards. This is where it gets messy for me - I still find it hard to understand the individual functionalities of the boards, and the acronyms do not help me one bit. Also I do not see how I could start writing code - I simply don’t know where to begin. So I downloaded Arduino, found out through various hints on various FabAcademy and GIT pages how to find and install the ATTINY412 core (again terminology I am not confident with - not that I could not look it up, but there is, in my perception, such a vast terrrain of things I am not familiar with that I feel hopeless randomness in trying to plot a course.) attiny412

…so that is good - at least I am playing with the same deck of cards as everybody else. My foggy covidbrain found me -through sites of peers that I did not bookmark- the function in Arduino where you can run an example - arduinoblink I figured that would be my safest bet - I will look at what this program has done for me after it has done it. Blinking it will be. Good, compiling works. compiling

However, I need to connect my board to the computer for the rest uploading …and without USB-hub that, apparently, is unsafe. So to the Waag I went, a bit apprehensive because an assignment in which you only push a few preconfigured buttons in an IDE: are you sure it is that easy, even if that would be spiral number 1? …and then the rest of the day I spent at the CNC machine - so I still do not know what I do not know. My peers looked frustrated today - that was promising… Edit: got it running.

code: /* Blink

This example code is in the public domain. */

// the setup function runs once when you press reset or power the board void setup() { // initialize digital pin LED_BUILTIN as an output. pinMode(LED_BUILTIN, OUTPUT); }

// the loop function runs over and over again forever void loop() { digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }

code blink

Last update: July 9, 2022