What is Arduino: Simple Explanation and Example Code
microcontroller platform used to build digital devices and interactive objects that can sense and control physical devices. It includes both a physical programmable board and a software called the Arduino IDE to write and upload code.How It Works
Think of Arduino as a tiny, simple computer that you can program to control things like lights, motors, or sensors. It reads information from the outside world through its pins (like your senses) and then decides what to do based on the program you write.
When you write code in the Arduino software, it sends that code to the Arduino board. The board then follows your instructions to interact with the physical world. It's like giving commands to a robot helper that listens and acts exactly as you tell it.
Example
This example turns an LED light on and off repeatedly. It shows how Arduino controls hardware with simple code.
void setup() { pinMode(13, OUTPUT); // Set pin 13 as an output pin } void loop() { digitalWrite(13, HIGH); // Turn the LED on delay(1000); // Wait for 1 second digitalWrite(13, LOW); // Turn the LED off delay(1000); // Wait for 1 second }
When to Use
Arduino is great when you want to create projects that interact with the real world, like making a robot, building a weather station, or automating home devices. It is perfect for beginners because it is easy to learn and has many ready-made parts and examples.
Use Arduino when you want to quickly test ideas that involve sensors, lights, motors, or buttons without needing complex electronics knowledge.
Key Points
- Arduino combines hardware (a small board) and software (Arduino IDE) to create interactive devices.
- It reads inputs like light or button presses and controls outputs like LEDs or motors.
- It is beginner-friendly and widely used for learning electronics and programming.
- Arduino projects range from simple blinking lights to complex robots and smart devices.