The board has a compact form factor of 38X55mm and is an excellent solution for developing projects based on. If you upload the code without errors, the LED blink every half a second. The board is compatible with Arduino Mega 2560. Step 5: Connect your Arduino to your PC using micro-usb to usb cable and upload the code, pressing upload button. the loop function runs over and over again foreverĭigitalWrite(LED, HIGH) //turn the LED On by making the voltage HIGHĭigitalWrite(LED, LOW) // turn the LED Off by making the voltage LOW
![arduino mega pinout uses arduino mega pinout uses](https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2015/11/Mifare_bb.png)
initialize digital pin LED as an output. the setup function runs once when you press reset or power the board In case you don´t have a LED you can use the built-in LED from the Arduino development board, just comments the first line of the code below, inserting “//” before “#” and replaces LED with LED_BUILTIN throughout the code #define LED 7 Step 4: Then copy the code below to your Arduino IDE project and save it. Step 3: Select your COM Port “Tools -> Port->…”. /uno-rev3 d12 d11 d10 d9 d8 d7 d6 d5 d4 d3 d2 d1/tx d0/rx pc6 reset adc0 adc1 adc2 adc3 adc4 adc5 pc0 pc1 pc2 pc3 pc4 pc5 d19/scl d18/sda aref gnd d13 pc5 pc4 pb5 pb4 pb3 pb2 pb1 pb0 pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 scl sda sck cipo copi ss a5 a2 a1 a0d14 d15 a2 d16 d17 d18 d19 a0 a1 a3 a4 a5 ioref nc +3v3 +5v. Step 2: Select your board on “Tools -> Board -> Board Manager…”. If you don´t have it installed yet you can download the last version from here: If you don’t have these parts, so you can also use the built-in LED of the Arduino board, which in this case is connected internally to the “D13” pin. Here we are using “D7” pin from Arduino Mega. In case you have the LED, the resistor and breadboard you can connect all together following the schematic below. I use pin 7 to connect LED, but you can use any of the digital pins. This tutorial uses a LED attached to an Arduino digital pin.
![arduino mega pinout uses arduino mega pinout uses](https://duino4projects.com/wp-content/uploads/2018/08/Arduino-Mega-Tutorial-–-Pinout-Schematics.jpg)
1x 330 ohm or 220 ohm resistor (optional).If you don’t have the optional parts written below, you can do this tutorial without them.
#Arduino mega pinout uses how to#
In this tutorial I am going to show you how to blink a LED using Arduino Mega 2560.