The biggest problem I faced when I wanted to learn Arduino was there are too many documents, learning guides, tutorials flooding around the internet and I had no idea which one to refer to.
Most of the learning guides that claim they were crafted for the beginners are just too surface while most of the time they only show you the schematics, give you the sample codes and tell you what to expect but they do not explain how it works. It is very frustrating for people like me who do not have C-programming background. Although I can achieve the expected results by following the schematic and codes given but I am pretty sure I can’t create my own project after I completed the lessons.
Another problem that I observed was most of the learning guides are created by the techies where things are assumed to be understood.
There is nothing special with the projects that I covered in this learning guide, I just added some notes and reminders on things that I did not understand. I try to simplify the technical part and I hope that at least the beginners benefit from this and enjoy learning with Arduino.
This beginner guide covers 7 lessons. Each lesson comes with several projects and one open-ended challenge.
Lesson 0 - Setting Up The Hardware & Software
Lesson 5 - Analog Input
Lesson 6 - DC Motor
Lesson 7 - Ultrasonic Sensor
****************************************************************************************************
Lesson 5 > Project 11: Display Analog Value on Serial MonitorStep 1. Get ready these components.
Step 2. Construct the circuit as shown below.
Step 3. Write these codes then upload to your board.
Step 4. Once done uploading, click 'serial monitor' (located at the right top bar). Immediately, you will see a pop up window appear
Step 5. Turn the potentiometer clockwise and counter clockwise and you will find the value displayed on the serial monitor changes as you adjust the potentiometer. The display values are analog value provided by the potentiometer.
Step 6. Check your result.
*********************************** End of Project 11 ************************************
Lesson 5 > Project 12: Read Analog IR SensorStep 1. Get ready these components.
Step 2. Construct the circuit as shown below.
Step 3. Upload the same program used in Project 11 on your board.
Step 4. Click the 'serial monitor' to observe the analog input’s value. Move your palm closer to the IR sensor to see the changes of the analog value.
Step 5. Check your result.
*********************************** End of Project 12************************************
Lesson 5 > Project 13: IR Sensor To Detect Black LineStep 1. Get ready a piece of white cardboard and black marker.
Step 2. Fold the cardboard as shown below:
Step 3. Draw a black line with 2cm thickness in the middle of the cardboard using the black marker.
Step 4. Fixed the distance between the cardboard and the IR sensor at approximately 2cm. Move the cardboard horizontally from the white surface to the black line.
Step 5. Observe and record the analog values from the serial monitor when the IR sensor is facing the white surface and black line respectively.
Step 6. Write these codes into a new sketch and then upload to your board.
Note: IRvalue > 500 is the threshold for my case. You can change the value according to the analog values shown in your serial monitor. You can pick any value between the white surface and black line.
Step 7. Check your result. LED 3 will light up when the black line is detected and it will go offwhen the white surface is detected.
This concept allows the IR sensor to be used at the mobile robots to follow lines.
*********************************** End of Project 13************************************
Q: Utilise the analog values from a potentiometer to change the blinking speed for LED 3.
Proceed to Lesson 6 >>
Comments