Robotics & Automation

Found 1 posts in category 'Robotics & Automation'.

Arduino Basics: A Step-by-Step Tutorial

Tutorial February 12, 2025

  • Connect the other end of the resistor to the Arduino’s GND pin.

Arduino Code:

Open the Arduino IDE and enter the following code:


// Arduino LED Blink Example

// The setup function runs once when you press reset or power the board.
void setup() {
  // Initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
}

// The loop function runs repeatedly forever.
void loop() {
  digitalWrite(13, HIGH);  // Turn the LED on (HIGH is the voltage level)
  delay(1000);             // Wait for one second (1000 milliseconds)
  digitalWrite(13, LOW);   // Turn the LED off by making the voltage LOW
  delay(1000);             // Wait for one second
}

Explanation: