How Do You Set It Up and What Can You Build?
If you want to start building your dream Arduino projects but don’t know where to begin, this guide is for you. Let’s start from scratch and learn what Arduino is. What Is Arduino? Arduino is a platform used to create interactive electronic projects. It includes both hardware and software. Each Arduino board has a microcontroller (usually Atmel AVR) and other electronic parts that help connect circuits. Arduino was created by a group of engineers in Italy. Some of the team members include: – Massimo Banzi – David Quartielles – Tom Igoe – David Mellis It’s completely open-source. That means you can buy a ready-made Arduino board or build your own using parts and program it yourself.
Arduino uses a programming language based on Wiring, and you write code using the Arduino IDE (a software based on Processing). The language is very similar to C, so if you know basic C, you can start coding easily. Once your code is ready, you upload it to the board using a USB cable. Anyone can use Arduino—students, teachers, artists, designers, architects, engineers. Whether for fun or for professional work, it’s a great tool for learning and creating.
What Can Arduino Do?
Arduino has analog and digital pins. These let you read signals from sensors and send signals to other devices. You can connect sensors to get input from the environment, process that data, and create output signals. This lets you build robots, smart systems, and many other electronic projects. In short, with Arduino you can build robots, drones, automation systems, smart devices, remote-controlled machines, wearable tech, and much more.
#define led 2
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH); // turn LED on
delay(1000); // wait 1 second
digitalWrite(led, LOW); // turn LED off
delay(1000); // wait 1 second
}
How It Works
– #define led 2 tells the program that “led” means pin 2.
– setup() runs once when the Arduino starts.
– pinMode(led, OUTPUT) sets pin 2 as an output.
– loop() runs over and over while the Arduino is powered.
– digitalWrite(led, HIGH) turns the LED on (5V).
– delay(1000) waits for 1000 milliseconds (1 second).
– digitalWrite(led, LOW) turns the LED off (0V).
– Another delay(1000) waits again before repeating.
Uploading the Code Make sure your board and port are selected under Tools. Click the arrow button to upload the code. Save the file when asked. Once uploaded, your LED will blink every second—on for 1 second, off for 1 second—until you unplug the Arduino.
Don’t forget: semicolons are important! If you miss one, the code won’t work.
Now enjoy your blinking LED—it’s like your Arduino is saying hello!
Bouncing Text with Arduino and LCD
Hi everyone! In this project, we’ll create a bouncing text effect using a 2×16 LCD screen and an Arduino. To keep the wiring simple, we’ll use an I2C module. Let’s get started!
What You Need
Arduino – I2C 2×16 LCD screen – Jumper wires
Wiring the Circuit We’ll connect the parts using the I2C module, which makes things much easier. Without it, the wiring would be messy and hard to manage. – Connect GND and VCC from the module to Arduino’s GND and 5V. Connect SDA to A4 and SCL to A5 on the Arduino. That’s it your circuit is ready!
Installing the Library Since we’re using the I2C module, we need to install its library. Download the ZIP file. In Arduino IDE, go to: Sketch → Include Library → Add .ZIP Library – Select the downloaded file and click “Open.” Now we’re ready to code.
Writing the Code First, we include the library and create an LCD object: LiquidCrystal_I2C lcd(0x27, 16, 2); Here, 0x27 is the I2C address, and 16, 2 means our screen has 16 columns and 2 rows.
In the setup() function, we start the LCD with lcd.begin().
In the loop() function, we call a custom function called scrollText(). This function takes two inputs: the text and the delay time. Important: the text must be shorter than 16 characters, or it won’t move. I used “Robolink” as an example.
Why a Separate Function? We could write everything inside loop(), but using a separate function makes the code cleaner and easier to understand.
How It Works The function first checks the length of the text. For “Robolink,” the length is 8. Then we use a for loop to move the text to the right. It goes from position 0 to 8 (which is 16 minus 8). At each step: – lcd.clear() clears the screen – lcd.setCursor(i, 0) sets the position – lcd.print(text) writes the text
After that, a second for loop moves the text back to the left. So the text bounces from side to side. This is different from regular scrolling, which usually goes in one direction.
Upload the code to your Arduino and watch the text bounce left and right on the screen.
Thanks for reading! See you in the next project 🙂
The red, yellow, and green LEDs light up and turn off in sequence. After the green LED blinks, the cycle continues infinitely by returning to yellow and red again.
Required Components for the Arduino Traffic Light Project
Red LED
Yellow LED
Green LED
Resistors
Mini Breadboard
Jumper Wires
Arduino UNO
#include <Arduino.h>
#define kirmizi 6;
#define sari 5;
#define yesil 3;
void setup() {
Serial.begin(9600);
pinMode(6,OUTPUT);
pinMode(5,OUTPUT);
pinMode(3,OUTPUT);
}
void loop() {
// while true sayesinde döngü sonsuza kadar devam eder.
while (true) {
digitalWrite(6,HIGH); // kırmızı ışığı yaktık.
delay(4000);
digitalWrite(6,LOW); // kırmızı ışığı kapattık.
digitalWrite(5,HIGH); // Sarı ışığı yaktık.
delay(2500);
digitalWrite(5,LOW); // Sarı ışığı kapattık.
digitalWrite(3,HIGH); // Yeşil ışığı yaktık.
delay(3000);
digitalWrite(3,LOW); // Yeşil ışığı kapattık.
digitalWrite(5,HIGH); // Sarı ışığı yaktık.
delay(2500);
digitalWrite(5,LOW); // Sarı ışığı kapattık.
digitalWrite(6,HIGH); // kırmızı ışığı yaktık.
delay(2000);
}
}
Web sitesi trafiğini analiz etmek ve web sitesi deneyiminizi optimize etmek amacıyla çerezler kullanıyoruz. Çerez kullanımımızı kabul ettiğinizde, verileriniz tüm diğer kullanıcı verileriyle birlikte derlenir.