Sunday, November 28, 2021

Arduino Tasks

Arduino programming

This week, 4 tasks are assigned to us to interface input and output devices.

1. Input devices:

a. Interface a Potentiometer Analog Input to maker UNO

board and measure its signal in serial monitor Arduino IDE

b. Interface an LDR to maker UNO board and measure its

signal in serial monitor Arduino IDE

2. Output devices:

a. Interface 3 LEDs (Red, Yellow, Green) to maker UNO

board and program it to perform something (fade or flash

etc)

b. Interface the DC motor to maker UNO board and

program it to on and off using a push button on the board


Potentiometer Analog Input



After I replicated the physical board, I got to see the change in the effect of the Potentiometer Analog Input in person. The further I turned the meter to the right, the slower the blinking of the LED.

By looking through the Arduino. cc guides, I reminded myself that I can find the serial monitor to find the output of the potentiometer by adding [Serial.begin(9600);] under void setup and [Serial.println(sensorValue);] under void loop.l

Figure showing the change in output when turning the Potentiometer from left to right.


LDR input

LDR being light-dependent controls the led by changing its intensity when the light intensity around it changes


LDR is bright in high light intensity

LDR is dim in low light intensity



LED serial output

This activity was basically combining what I have learned from connecting a simple LED and the competency test in sequence. I connected 3 LEDs and made them light up in sequence with a 1-second interval.


Physical Arduino board wiring:



DC motor Output:
This activity was brand new, hence it was actually interesting to learn. There are many guides on the internet, all with varying solutions. The one I used is actually a combination of several sources, which I was very surprised to see that it works on the first try.

Physical Arduino board wiring:
Video of dc motor working:


Reflection:
These Arduino activities let me use what I have learned from the classroom and what I have researched to actual use, hence it felt actually very rewarding to carry out and see it work. It was also a reminder as both the Arduino and breadboard were not new to me as I have done it in secondary school, courtesy of SP for the experience. These skills that I have acquired through this experience made me a lot more confident for other projects such as the capstone in the future.






No comments:

Post a Comment

Project Development Entry

Our team Chemical Device We came out with an idea to help automate the cooking of soft-boiled eggs. It will help solve the eggs being over...