Arduino Basics
Hardware Anatomy

Ports Voltage and Current
VIN
7-12V, ~1A
USB Port
5V, ~1A
Digital pins
5V, ~40mA
5V pin
~800mA
Difference between Vin and 5V pin
The Vin pin is used to supply an external voltage to the Arduino board. Its usage is that you can power the Arduino by supplying an external power source (like a battery or a power adapter) to the Vin pin.
The 5V pin can either be an input or an output depending on how you're powering the board.
Output: When the Arduino is powered through the USB port or the Vin pin, the 5V pin provides a regulated 5V output that can be used to power other components like sensors or modules.
Input: You can also directly supply 5V to the 5V pin to power the Arduino, bypassing the onboard voltage regulator.
Digital Pins
Pins 0-1
Serial CCOM
Pin 13
LED pin
Pin (~)
PWM
API
Basic Digital Input/Output (I/O)
Timing
In Arudino, the millis() and micros() are built-in functions that return the number of milliseconds/microseconds that have passed since the Arduino board began running the current program (since the board was powered on or reset). And below is an example to blink the LED.
Examples
LED Blinking
In this example, we can get a glimpse of how the delay() function works, it actually pauses the execution of the program for a specified amount of time. For example, at line 7, we execute the delay(1000), notice that the unit is milliseconds. Now the program is paused and the LED is ON because that after line 6, no instruction is executed, so LED will remain ON.
Last updated