4. Embedded programming¶
This week I learned about micro controllers, types of them and how to install them and do the programming for them.
Arduino¶
I downloaded the Arduino application from the website Download Arduino
I connected it to the computer with the cable
On the top left search for the model of the arduino i am using, in my case i am using MKR 1010
I uploaded an example to work on, as a beginner I chose blink because it is simple for learning.
It takes me to a new page with the code, so i press on verify on the top left
Then upload
Easy test¶
For testing it, i changed the time to 5000 millisecond
Upload it again
Medium test¶
It is to choose a word in my case its TREE, so i can take the letters menu and see how many seconds each letter represent
Then do the code based on the letters
THONNY¶
Download THONNY
Plug in the micro controller to the laptop and the LED to the micro controller No.3
After opening the app, go to tools then options
Select Interpreter
Press on install
Select the Target port, Micropython Family, Variant as shown in the figure below and the version will appear automatically. Then click install
After finishing uploading, press close then ok.
To see the folder that has been installed go to view then press file
Simple code¶
to test the timing for on and off for the LED
### Hard code
Then I made a more complicated code to add more inputs and control them by giving them specific demands.