Hey there! 😁
Recently, I have learnt a new skillset of extraordinary possibilities: Arduino Programming! At first, the concept was a bit hard to grasp but after a few experimental tries, I learnt the basics of understanding how to command a Arduino Motherboard to do things.
Together with my team, we experimented the four challenges with Arduino as our first learning point.
💫First Challenge: Hello World! (Blink)
Firstly, we had to understand and decipher the code. Then, we had to challenge ourselves to modify it to our will. So for the Blink challenge, I changed the blinking of the light from pin 13 to pin 3.
Code Link: Blink Link
💫Second Challenge: Programmable Button (DigitalInputPullup)
For this one, I was able to change the action of pin 13 lighting up instead of pin 2 when I press the programmable button to the action of pin 5 lighting up in the place of pin 13.
Code Link: DigitalInputPullup Link
💫Third Challenge: Make Some Noise! (ToneMelody)
Without modifying, the tone melody would start once the mother board is plugged in. However, I was able to modify it so that the sound only starts when I press the programmable button.
Code Link: ToneMelody Link
💫Fourth Challenge: Servo
Originally, with the basic Servo code, the vane of the servo motor would turn a full 180 degree before resetting to its original position and repeating the 180 degree movement over and over. After modifying, I was able to change the angle setting from 20 degree to 150 degree,
Code Link: Servo Link
💪Individual Task
As a test to clarify our knowledge of Arduino Programming as well as a platform to learn more from the examples of other people, the lecturer introduced us to TINKERCAD, an online sharing website where people can share and learn codes or systems to and from other learners and experts.
1. Input Devices
For input, I learnt various ways of how to inputting a certain code and function can lead to various achievements with the results. This way of interfacing allows us to know if a circuit and its components are functioning well or not. The task was rather doable and quite easy compared to the output devices.
(a) Interface a Potentiometer Analog Input to maker UNO board and measure its signal in serial monitor Arduino IDE.
💨Code Link: Potentiometer Code Link
💨Video Link: Potentiometer Simulation Link
💨TinkerCAD Link: Potentiometer TinkerCAD Link
💨Real Simulation Link: Potentiometer Real Video Link
(b) Interface a LDR to maker UNO board and measure its signal in serial monitor Arduino IDE.
💨Code Link: LDR Code Link
💨Video Link: LDR Simulation Link
💨TinkerCAD Link: LDR TinkerCAD Link
💨Real Simulation Link: LDR Real Video Link
2. Output Devices
For output, I learnt how to make various movements and visuals occur from a given source. It was very hard to make it possible especially for the motor but I was able to achieve a successful result on TinkerCAD but I was not able to make it come true in reality. I suspect it may be due to some connections being loose but I am glad I did my best to understand what was necessary and what was unnecessary to make this command, especially on TinkerCAD where we can have a virtual simulation.
(a) Interface 3 LEDs (Red, Yellow, Green) to maker UNO board and program it to perform something (fade or flash etc.)
💨Code Link: Traffic Light Code Link
💨Video Link: Traffic Light Simulation Link
💨TinkerCAD Link: Traffic Light TinkerCAD Link
💨Real Simulation Link: Traffic Light Real Video Link
(b) Interface the DC motor to maker UNO board and program it to on and off using push button on the board.
💨Code Link: DC Motor Code Link
💨Video Link: DC Motor Simulation Link
💨TinkerCAD Link: DC Motor TinkerCAD Link
💦Reflection:
From this, I learnt to be able to tackle and troubleshoot problems to achieve the desired results as efficiently as possible. In a sense, I am glad to have achieved a better understanding of Arduino Programming despite having plenty of frustrations from missteps and experimental failures on the way. However, that feeling of having accomplished a command successfully truly does give me the satisfaction of being a learner and understanding struggles.
No comments:
Post a Comment