Skip to main content

Arduino Programming

Arduino Programming

In this blog, I will be showing my work on the input and output devices on Arduino (tinkercad), and also the Pegasus challenge that my team did for the practical session.

1. Input devices: 
a. Interface a Potentiometer Analog Input to maker UNO board and measure its signal in serial monitor Arduino IDE.
In the screenshot above on the left, it is the connection between the Arduino and the breadboard that is done on tinkercad. On the right, it shows the codes for the potentiometer. This is what I have learnt from the youtube videos. However, in these set of codes, the serial connection has not been established, so I have made the changes and uploaded onto Arduino IDE. These are the codes, and the explanation for the program codes are in the comments at the side:

The screenshot below shows the signal shown in the serial monitor in Arduino IDE:

This is the a video of how it looks like on the Arduino board:

The simulation is shown in the embedded file below:
Here's the link to the tinkercad circuit: https://www.tinkercad.com/things/bu3TgkrUBlP
This is the link to download the Arduino program codes:


b. Interface a LDR to maker UNO board and measure its signal in serial monitor Arduino IDE.
This screenshot shows how the Arduino and the components are connected. On the right, it shows the codes that were used, and also the explanation for the codes in the comments beside it.
In this screenshot, it shows the signal in the serial monitor in Arduino IDE. It shows that when there is lower light level, the resistance increases, thus the light will become dimmer. 
The example is shown in this video:
The simulation is shown in the embedded file below:
Here's the link to the tinkercad circuit: https://www.tinkercad.com/things/8fSJkW0hHMd
This is the link to download the Arduino Program codes: 


2. Output devices: 
a. Interface 3 LEDs (Red, Yellow, Green) to maker UNO board and program it to perform something (fade or flash etc) 

The screenshot above shows how the circuit is connected. On the right side, it shows the codes and the explanation.
The simulation can be shown in the embedded file below:

Here's the link to the tinkercad circuit: https://www.tinkercad.com/things/kLtHzULP9T3
This is the link to download the Arduino Program codes: 


b. Interface the DC motor to maker UNO board and program it to on and off using push button on the board.
This photo shows how the circuit is connected using the Arduino board.




This photo shows the codes used and also the explanation for each line. The example is shown in the embedded file below:

Here's the link to the tinkercad simulation: https://www.tinkercad.com/things/krcZ8wWlBHY
This is the link to download the Arduino Program codes: 
In conclusion, these are the input and output devices that we are tasked to do on tinkercad.


During the Arduino practical session, the activity that was given for us to complete during the practical is to make the wings of the unicorn flap. This is what we have made during the practical session:


This is the downloadable Arduino programming file:

Upon completing the challenge, we were given two challenges by one of the lecturers. The first challenge is to make both the wings and the tail move simultaneously. The second challenge is to put LED on the unicorn's eye and make it light up. This is what we came up with:
When attempting these challenges, we faced a lot of difficulties mainly because of space constraints, so we have to think of how we are going to solve these problems.
One of the problems is connecting the LED light to the eye of the Pegasus. The breadboard cannot fit into the head of the Pegasus, so we had to use some crocodile clips to connect the LED to the breadboard that is underneath the Pegasus. Another problem we had to solve was the placement of the second servo motor for the tail. Since the space within the body is not huge, we have decided to attach below the Pegasus. Another problem that we encountered is the connection at the breadboard. Since there are so many connections, there will be a lot of wires and it can get quite confusing at times. Therefore, we try to colour code the wires as much as possible. The Arduino and breadboard connections that is underneath the Pegasus are shown below:

Here are some videos of our final product:

The link to the downloadable file is here:
In conclusion, I have learnt a lot about Arduino programming. During the practical lesson, there was an individual competency assessment, which I think I did okay. Through the different challenges and learning packages that were provided to us, I get to learn a lot. Even though it can be quite tedious, but I had a fruitful experience. 

I feel that Arduino programming is important because it is the basics of programming, and as the world is moving to a more digital future, I feel that gaining some knowledge of programming can be very useful in the near future. I feel that what makes this Arduino programming interesting is what I can do with it. There are a lot of wonders that I can create with Arduino. By mastering this skill, it will be very useful for the project in this module. My group is making an air-to-water machine. Arduino programming can be used for the digital areas of the machine. Moreover, we can improvise and use more functions of the Arduino board if we want to.

I used to think that programming is very difficult. Now I think that it is very important and very useful for our projects. I feel that I have learnt a lot through these lessons and learning packages. So next I will continue to discover more about Arduino because of the amazing things that it can do. I feel that I can learn more on Arduino online, so that I can fully understand what Arduino is capable of. Then, I can create whatever I am interested in next time.


Comments

Popular posts from this blog

Home

Hi, Welcome to My Blog!! In this semester, I am taking a module called Chemical Product Design and Development. I will be documenting about everything I learn on this blog.  I am thrilled to start this module because I get to learn new skills such as laser cutting and Arduino Programming that will help refine my team's product idea. I am from Team Trio, and our team's product idea is an air-to-water machine which will absorb water vapour in the air and produce clean drinkable water.  My Personal Goals I want to improve my CAD skills on Fusion360. This is because I believe that 3D printing will be very important and relevant in future. Therefore, by mastering my CAD skills, I will be able to create many different product ideas with ease.  Another one of my personal goals is to master experimental designs. I believe that it will be very important that we know how to create experiments that will help us determine the objective accurately. This can help us a lot in our Final Year P