Welcome to my first Arduino coding guide. This would take you to kickstart with Arduino boards. I would go through following things really quickly and thoroughly. You would enjoy this post. Arduino boards are really famous for hobby and rapid prototyping, types of applications. Kids really love Arduino boards. If you are an engineering student. I would request you to please stay away from Arduino boards if you really want to learn how to build your own custom hardware boards. It might be good for the project but you may lose a lot of essential skills needed to design reliable hardware. You get lifelong skills when you get a problem and you solve it all the way on your own. You never forget that problem and learning.
1) Arduino setup (software and hardware)
2) Coding example
To program an Arduino board you need to install Arduino software. Here is the link to download Arduino software https://www.arduino.cc/en/Main/Software
Please, select Windows if you are using windows 10 operating system as marked in figure 1 below.
Please click on just download as marked in figure 2 below. I would encourage you to donate them some amount because they are contributing towards a better future for your children and for young engineers. Your contribution would enhance the development process and I believe that your good deeds would come to you one day for sure.
Please, wait for the Arduino setup to download. grab some popcorns with you :)
Once it is downloaded click to install it. use next→ next and you will reach to this point. you are almost done just wait for a couple of minutes for this installation as shown in figure 4.
Wow at this point you are down with installation just double-click on Arduino you can find this icon on your desktop as shown in figure 5 below.
|Figure 5. Wow its done Just double-click on this|
|Figure 6. Software installation is done.|
Now, At this time I have an Arduino Mega 2560. This board comes with USB type B cable. Connect your board with USB cable connector on board and to computer's USB port. USB connector is marked in figure 7 below
|Figure 7 USB connection to this board.|
Now, you have to select the communication port for Arduino board. Go to Tools→Ports→(Select Mega2560) as shown in figure 8 below.
|Figure 8 Communication port selection in Arduino (COM6).|
Now, You have to select which board you are using. Go to Tools→Boards→(Select Mega2560) as shown in figure 9 below.
|Figure 9. Arduino board selection.|
At this point, you are done with Arduino setup both hardware and software. Now, you are ready to program your first "Hello world" code. By means, Hello World is the very basic code that we can program to test hardware.
The basic thing about Arduino is there are two functions as you can see in figure 10 below. The first setup function is called at the beginning when you turn on the hardware. and the loop function would be called every time after that. So the tasks which you want to do once at the startup of a board like initializations of Input and Output ports should be done in setup() function.
|Figure 10 Setup function|
|Figure 11 Pin mode as Output|
|Figure 12 LED blinking code.|
|Figure 12 Upload the code to Arduino board.|
|Figure 13 LED blinking|
Thank you for reading this post. Just try it and you would love to do programing.
If you learned something interesting please contribute to the future posts. I would appreciate your contribution to opensource free information.
- USB HID host using PIC32.
- How to interface 4x4 Keypad with PIC.
- Two wirelessly communicating Circuits using Xbee
- How to get interrupt on change on logic on Pins (Input Change Notification).
- Over Voltage Protection
- Step by step homemade PCB tutorial
- How to measure Negative and Positive temperature using LM35
- AC Voltmeter RMS + Peak voltage
For all topics Click here
All the text and graphics contained on this page belongs to owner except otherwise mentioned. Other parties' trademarks and service marks that may be referred to herein are the property of their respective owners. Reproducing or distributing text and graphics on your own site is strictly not allowed without proper linking to original content and before publishing that you should ask for permission.
© Copyright 2018 IbrahimLabs. All rights reserved.