Explore beginner tutorials, automation projects, IoT hacks and more.
Learn the classic “Hello World” of Arduino — making an LED blink.
Read MoreFrom DC to Servo motors, this guide helps you spin them all using Arduino.
Read MoreDisplay any message or sensor data using LCDs and I2C modules.
Read MoreInstall OS, setup Wi-Fi and explore the terminal for the first time.
Read MoreConnect the Pi Camera module and capture photos or stream live video.
Read MoreBuild IoT systems with Node-RED, sensors, and web-based controls.
Read MorePublished on July 22, 2025 by MakerWorks Team
Welcome to the classic "Hello World" of Arduino! This tutorial will walk you through the simplest yet most fundamental project: making an LED blink. It's an excellent starting point for anyone new to Arduino and embedded systems, as it introduces basic concepts of circuit building and programming.
Connecting the components is straightforward:
Open your Arduino IDE and copy-paste the following code. This code will turn the LED on for 1 second, then turn it off for 1 second, repeatedly.
// 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 over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second (1000 milliseconds)
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Explanation of the Code:
Once uploaded, you should see your LED blinking! Congratulations, you've just completed your first Arduino project!
Stay tuned for more exciting projects and tutorials from MakerWorks!
Published on July 29, 2025 by MakerWorks Team
Motors are the muscles of robotics and automation. This guide will teach you how to control various types of motors using your Arduino, including **DC motors**, **servo motors**, and **stepper motors**.
To control a DC motor's direction and speed, you'll typically use an H-bridge motor driver.
Connect your Arduino's digital pins to the IN pins of the L298N, and an Arduino PWM pin to the EN pin for speed control. Connect your motor to the OUT pins of the L298N, and provide external power to the driver.
// L298N Motor Driver Pin Definitions
const int enA = 9; // Enable pin for Motor A (Connect to Arduino PWM pin)
const int in1 = 10; // Input 1 for Motor A
const int in2 = 11; // Input 2 for Motor A
void setup() {
// Set all motor control pins as outputs
pinMode(enA, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
}
void loop() {
// Rotate motor in one direction (e.g., clockwise)
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
analogWrite(enA, 200); // Set speed to ~78% of max (0-255)
delay(2000); // Run for 2 seconds
// Stop the motor
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
analogWrite(enA, 0); // Speed 0 = stop
delay(1000); // Stop for 1 second
// Rotate motor in the opposite direction (e.g., counter-clockwise)
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
analogWrite(enA, 200);
delay(2000); // Run for 2 seconds
// Stop the motor again
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
analogWrite(enA, 0);
delay(1000); // Stop for 1 second
}
Explanation:
Servo motors are much simpler, requiring only one signal pin, power, and ground. The Arduino `Servo.h` library makes control very easy.
#include <Servo.h> // Include the Servo library
Servo myServo; // Create a servo object
void setup() {
myServo.attach(9); // Attach the servo to digital pin 9
}
void loop() {
myServo.write(0); // Move servo to 0 degrees
delay(1000);
myServo.write(90); // Move servo to 90 degrees
delay(1000);
myServo.write(180); // Move servo to 180 degrees
delay(1000);
}
This is just a brief overview. Controlling different motors involves specific libraries and setup. Explore more details for stepper motors and advanced control techniques in dedicated tutorials!
Published on August 5, 2025 by MakerWorks Team
Display custom messages or sensor data on a **16x2 LCD (Liquid Crystal Display)** using your Arduino. We'll cover both the traditional direct wiring method and the much simpler **I2C module** method.
LCDs are invaluable for projects that need to provide immediate visual feedback without a computer, such as displaying temperature, sensor readings, countdown timers, or simple status messages.
This method involves connecting many pins directly from the LCD to the Arduino. While educational, it consumes a significant number of Arduino's digital pins.
A direct 16x2 LCD connection typically uses 10-12 Arduino pins. This can quickly use up valuable pins for more complex projects.
The **I2C (Inter-Integrated Circuit) backpack module** is a small board that attaches to the back of your 16x2 LCD. It acts as an interface, allowing you to control the LCD using only **two Arduino data pins (SDA and SCL)**, plus power (VCC) and ground (GND).
This method is far cleaner and saves many Arduino pins for other sensors or components.
First, install the `LiquidCrystal_I2C` library via **Sketch > Include Library > Manage Libraries...** in the Arduino IDE.
#include <Wire.h> // Required for I2C communication
#include <LiquidCrystal_I2C.h> // Include the I2C LCD library
// Set the LCD I2C address. Common addresses are 0x27 or 0x3F.
// You might need to run an I2C scanner sketch to find the correct address for your module.
// For a 16 columns and 2 rows display:
LiquidCrystal_I2C lcd(0x27, 16, 2); // (I2C address, columns, rows)
void setup() {
lcd.init(); // Initialize the LCD
lcd.backlight(); // Turn on the backlight (if your module has one)
// Print a message to the LCD
lcd.print("Hello, Maker!");
lcd.setCursor(0, 1); // Set cursor to the beginning of the second line (column 0, row 1)
lcd.print("MakerWorks!");
}
void loop() {
// You can update the display here based on sensor readings, button presses, etc.
// Example: Display elapsed time
// lcd.setCursor(0, 0);
// lcd.print("Time: ");
// lcd.print(millis() / 1000); // Display seconds
}
Using the I2C module is highly recommended for its simplicity and reduced pin usage, making it ideal for most Arduino projects involving LCDs!
Published on August 12, 2025 by MakerWorks Team
The **Raspberry Pi** is a tiny, affordable single-board computer that you can use for everything from learning programming to building complex automation projects, or even creating a fully functional desktop PC. Let's get yours set up!
Raspberry Pi OS (formerly Raspbian) is the official operating system for the Raspberry Pi.
Even if you did updates during the setup, it's good practice to update regularly. Open a **terminal** (usually by clicking the black icon on the taskbar or pressing `Ctrl+Alt+T`) and run:
sudo apt update # Fetches the latest list of available packages
sudo apt full-upgrade # Installs available updates for all packages
sudo reboot # Reboots your Raspberry Pi after updates
The terminal is a powerful tool for controlling your Pi. Here are some basic commands:
You've successfully set up your Raspberry Pi! You're now ready to dive into programming, hardware projects, and the vast world of DIY electronics.
Published on August 19, 2025 by MakerWorks Team
Add vision to your Raspberry Pi projects! This tutorial shows you how to connect and use the **official Raspberry Pi Camera Module** to capture photos, record videos, and even stream live footage. This is essential for surveillance systems, robotics, and computer vision applications.
This is a delicate but straightforward step. Ensure your Raspberry Pi is **powered off** before you begin.
The camera interface is usually disabled by default for security and resource management.
sudo raspi-config
After rebooting, your camera should be ready! Newer versions of Raspberry Pi OS (Bullseye and later) use `libcamera` tools. Older versions used `raspistill` and `raspivid`.
These commands are run in the terminal.
libcamera-still -o my_first_image.jpg
This will capture an image and save it as `my_first_image.jpg` in your current directory.
libcamera-vid -o my_first_video.h264 --t 5000
The `--t 5000` specifies the duration in milliseconds (5000ms = 5 seconds). The video will be saved as `my_first_video.h264`.
libcamera-preview
raspistill -o image.jpg
Captures an image and saves it.
raspivid -o video.h264 -t 10000
Records a video for 10 seconds.
The Raspberry Pi Camera Module opens up incredible possibilities for surveillance, time-lapse photography, security systems, and even basic computer vision projects! Have fun exploring its capabilities!
Published on August 26, 2025 by MakerWorks Team
Transform your **Raspberry Pi** into a powerful **IoT (Internet of Things) hub** for home automation, environmental monitoring, smart gardening, and more! This guide introduces you to the concepts of IoT automation, building web-based controls, and integrating sensors for creating intelligent systems.
IoT automation involves connecting physical devices (like sensors that measure temperature, or actuators like smart lights) to the internet. These devices can then collect and exchange data, allowing them to be controlled remotely (via a smartphone app or web dashboard) or automatically based on pre-programmed conditions (e.g., turn on lights when it gets dark).
Let's build a simple system to read temperature and humidity from a sensor and display it on a web dashboard using Node-RED.
Connect your DHT sensor to the Raspberry Pi's GPIO pins:
Node-RED is a fantastic visual programming tool specifically designed for the Internet of Things. It often comes pre-installed on Raspberry Pi OS Full. If not, you can install it easily:
# This script will install Node.js, npm, and Node-RED
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
Once installed, start Node-RED with:
node-red-start
You can then access the Node-RED flow editor in your web browser by navigating to: `http://[your-pi-ip-address]:1880` (e.g., `http://192.168.1.100:1880`).
In the Node-RED editor:
Access your dashboard at `http://[your-pi-ip-address]:1880/ui`.
This is just the beginning! Node-RED offers immense flexibility to connect to various online services, databases, email, social media, and control a wide array of devices, making it a powerful tool for all your IoT automation dreams.