Free Shipping on orders over US$49.99

How To Upload Source Code In An Arduino Board?


Getting started with an Arduino board and uploading the code could be a little confusing for some beginners. Because getting all the details from one source is not always easy. To get started with the Arduino board, first you would need to install drivers, Arduino software or Integrated Development Environment (IDE), and then upload the code (called a sketch) to the Arduino board.

The step-by-step procedure to work with an Arduino board is given below. It is applicable for the PCs using Windows as the operating system (OS), including Windows 7, 8, and 10 versions. The steps are also applicable for Windows XP but some of the dialogue windows may be different.

Follow the steps below to start with Arduino board:

  1. Install Arduino IDE in your PC. You can download the latest version of Arduino software from this link.
  2. Connect your Arduino board to PC using a USB cable and wait for Windows to begin USB driver installation process.
  3. If the Windows installer does not start automatically, open the Windows Device Manager from Start→ Control Panel option and find the Arduino under Ports (COM&LPT) list.
  4. If Arduino is not found, go to Other Devices and select the Unknown Device option. Then update the driver.
  5. Select ‘Browse my computer for driver software’ option and go to the Arduino software download location and select Arduino.inf file/Arduino uno.inf (depending on your software version) to install the driver.
  6. After successful installation of the driver, from the Arduino IDE select Tools/Board option. From here select your Arduino board among those listed, such as Arduino Uno, Arduino Mega 2560, Arduino Leonardo, etc.
  7. Choose the correct serial COM port for your board. The COM port number will be visible under Device Manger.
  8. Open the source code/sketch, compile it and upload the code to Arduino board by clicking the Upload button. If you do not have the sketch ready, the easiest way to start with the Arduino programming is to use the ‘Blink’ sketch from the Examples in Arduino. You can access Blink source code from File→Examples→Basics option, as shown in Fig. 1.
  9. Compile the code and upload it to the Arduino board.

After uploading the code, you can access the Arduino pins or interface the pins with other devices. For example, the above Blink sketch is used to control (turn on/off) an LED through Arduino pin 13. You can change the LED blinking frequency by changing the code in Blink sketch.

Arduino boards—including Arduino Uno, Arduino Mega 2560, and Arduino Leonardo—are available from various online shops.


 





Source link

We will be happy to hear your thoughts

Leave a reply

AmElectronics
Logo
Enable registration in settings - general
Compare items
  • Total (0)
Compare
0
Shopping cart