9. Embedded programming¶
This week I worked on different ways to use arduino and practice programming using tinkercad circuits.
Task 1: Read a microcontroller data sheet¶
I read part of the information about the ATtiny44
DATASHEET MICROCHIP ATTINY 24/44/84
The datasheet gives me the information of the 14 PINS that let me know where do in need to place the different electronic components. The datasheet gives me the description of what king of component can be connected in each one of the PINS like for example:
- PIN 1 VCC is for voltage supply.
- PIN 14 GND is for ground only.
- PIN 4 RESET is for RESET.
- PINs 6 to 13 or PORT A is a 8-bit bidirectional port.
- PINs 2 to 4 or PORT B is a 4-bit bidirections port. The RESET Pin is inside this group.
Task 2: Program your board to do something.¶
Due to the lockdown of the Fablab i use tinkercad to program an arduino.
I use the following items
ITEM | ITEM | ITEM |
---|---|---|
Arduino UNO | Resistor 221 Ohm | Resistor 1K Ohm |
Photoresistor LDR | LED | Protoboard |
The code:
Before the simulation
After the simulation when the LDR is bright the LED turns on.
I tried using Fritzing (https://fritzing.org/home/) to design the same circuit using Arduino and a breadboard and here the result.
Programming an Arduino with a button.
Programming an Arduino with 05 Leds: Each LED will turn on and off each 10000 microseconds.
Here the components taken.
Here the simulation off
Here the simulation on
Arduino working according to the circuit done in Tinkercad. Code attached. I use the color of LEDs i have and will differ from the one done in Tinkercad but the circuit works.
Arduino LEDs On-Off from Manuel Corrales Arana on Vimeo.
I worked aldo with the RFID Card i will use for my project.
TESTING THE RFID CARD WITH ITS READER IN ARDUINO The RFID reader is attahed to the Arduino UNO and when the White RFID Card is attached to the reader, the blue led turns on.
Testing the Arduino with RFID Reader and Card from Manuel Corrales Arana on Vimeo.