Welcome back everybody! Today I will be sharing my experience my journey in Arduino Programming using the maker UNO kit as well as showing some of the the tasks that I have completed.
Contents
1. Input devices:
a. Interface a potentiometer analog input to maker UNO board and measure/show its signal in serial monitor Arduino IDE. b. Interface a LDR to Maker UNO board and measure/show 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. Include the pushbutton on the Maker Uno board to start/stop part 2.a. above
3. For each of the tasks I will describe:
a. The code that I have used and explanation of the code.
b. The references that I used to write the code
c. The problems I encountered and how I fixed them.
d. The evidence that the code worked in the form of video of the executed
code.
4. Finally, I will be sharing my Learning reflection in Arduino Programming.
Input devices: Interfacing a potentiometer analog input to maker UNO board and measuring its signal in serial monitor Arduino IDE
1. Below is the code I have used and the explanation of the code:
2. Below is the reference I used to write the code:
3. Below are some of the problems I have encountered and how I fixed them:
The main problem I encountered for this task is getting the serial monitor to show the effects of turning the potentiometer. This is because the video I was referencing did not have the code for this and as a result I thought the problem was with the IDE rather than the code.
Thankfully, after searching online for help, I found out that I was missing the codes necessary for the serial monitor to work. These codes are:
Serial.println(sensorvalue);
4. Below is the video that shows the code is working:
Input devices: Interfacing a LDR To maker UNO board and measuring its signal in serial monitor Arduino IDE
1. Below is the code I have used and the explanation of the code:
2. Below is the reference I used to write the code:
3. Below are some of the problems I have encountered and how I fixed them:
I wanted the code to light up when the LDR value is high but the code I was referencing did not explain how to modify the code.
After consulting some of my friends and referring to Brightspace, I was able to realise the method to make the LED light up. This is through the use of the code:
if(sensorValue > 600)
digitalWrite(LED_BUILTIN, HIGH);
else
digitalWrite(LED_BUILTIN, LOW);
4. Below is the video that shows the code is working:
Output devices: Interface 3 LEDs (Red, Yellow, Green) to maker UNO board and program it to flash
1. Below is the code I have used and the explanation of the code:
2. Below is the reference I used to write the code:
3. Below are some of the problems I have encountered and how I fixed them:
The problem I encountered in this task is that the green LED I was using was relatively dim compared to the other two. I tried to figure out what the problem was by switching all the placements of the LEDs but the green LED remained as the only one that is dim. From this I was able to conclude the code was not the problem but rather the setup.
As a result, I reassembled the entire set up and replaced each equipment at a time. It was from this that I realised the resistor I chose had too high resistance and so I changed it out and it works.
4. Below is the video that shows the code is working:
Output devices: Include pushbutton to start/stop the previous task
1. Below is the code I have used and the explanation of the code:
2. Below are the references I used to write the code:
3. Below are some of the problems I have encountered and how I fixed them:
The main problem I encountered for this task is modifying the code to include both the code for the button and the code for the LEDs. I already knew how to code them separately but combining them together was much more difficult.
Along with my friend, we searched online for a method to include both of the codes together and finally arrived at the final product.
4. Below is the video that shows the code is working:
Below is my Learning Reflection on the overall Arduino Programming activities.
In the first lesson on Arduino programming, I was introduced to the Maker Uno kit, there were so many different parts that overwhelmed me initially. However, I vaguely remembered using a similar kit back in secondary school so it helped me to get a grasp on what is going on.
Although my teacher took his time to explain each part to my class, I still had difficulty understanding each of the parts' use and was panicking a little. Despite this I was not discouraged as I have always been better at learning through experience.
As my teacher got us to go through some of the activities in the Brightspace learning package, I was much more familiar with each of the parts. For each of the activities, there were already code that was programmed for us and all I had to do was copy and paste into the Arduino IDE, so it was quite relieving as I get to study the code for the future and not have to stress over creating the codes.
After analyzing the codes, I realised that it was actually quite similar to Python which I already had some previous knowledge on. Hence, I was able to apply my skills of analyzing and creating code from Python and use it in Arduino programming. There were still major differences between the two coding methods but I was not worried as my teacher gave us plenty of time to test the maker uno kits out.
This first lesson was pivotal in developing my understanding of Arduino programming and I am extremely grateful to my teacher, Mr Chua and friends who have helped me a lot in my journey. This had been a very useful and fun topic to learn and I feel like learning how to program in Arduino code will be a key skill for me as Arduino code is actually quite similar to C++ which is a popular coding language.
Thank you for staying with me for so long! Please continue following me in my journey! Bye Bye!
Comments
Post a Comment