Welcome to Vumbua Synapse Kit
Congratulations on starting your electronics journey! The blinking LED is the equivalent of "Hello World" in programming. It's simple, visual, and gives you immediate feedback that your code is working.
This lesson teaches you fundamental concepts that apply to every single electronics project you'll ever build:
- How to control digital outputs
- Understanding pin modes (INPUT/OUTPUT)
- Basic programming structure
- Uploading code to microcontroller
- Troubleshooting techniques
What You'll Create
By the end of this lesson, you'll have a perfectly blinking LED connected to Pin D10 of the ATmega328P microcontroller on your Vumbua Synapse Kit.
Prerequisites
Required Hardware
- Vumbua Synapse Kit (with ATmega328P)
- USB Type-C cable (included)
- Computer (Windows, Mac, or Linux)
Required Software
- Arduino IDE 2.x (download below)
- Vumbua Board Definitions
- USB Drivers (if needed)
This is designed as your first ever electronics lesson. We assume no prior knowledge of programming or electronics. Every concept will be explained from the ground up.
Learning Objectives
By the end of this lesson, you will be able to:
- Understand what an LED is and how it works
- Install and configure Arduino IDE for Vumbua Kit
- Write your first Arduino program (sketch)
- Use pinMode() to configure pin D10 as OUTPUT
- Control LED with digitalWrite(HIGH/LOW)
- Create timing delays with delay() function
- Upload code to the Vumbua Synapse Kit
- Troubleshoot common blinking LED issues
- Modify blink patterns and timing
The skills you learn here apply to:
- Indicator lights in appliances
- Status lights on electronic devices
- Emergency vehicle lights
- Bicycle safety lights
- Communication signals
- And much more!
What is an LED?
Light Emitting Diode
Converts electricity to light
Anode (+)
Positive terminal (longer leg)
Cathode (-)
Negative terminal (shorter leg)
Current Limiting
Needs resistor (220Ω)
LED Characteristics
- Forward Voltage: ~2V (red), ~3.3V (white/blue)
- Current: 20mA typical (max 30mA)
- Polarity: Must be connected correctly (+ to +, - to -)
- Brightness: Proportional to current
IMPORTANT: LEDs always need a current-limiting resistor! The Vumbua Kit has this built-in for the on-board LED.
Why We Need a Resistor
Without a resistor, an LED would try to draw too much current and burn out. The resistor limits current to a safe level.
Example: (5V - 2V) ÷ 0.02A = 150Ω (use 220Ω for safety)
LED Circuit Basics
Let's understand how an LED circuit works:
Basic LED Circuit Diagram
The Vumbua Synapse Kit has built-in protection:
- Current limiting resistor already in place
- Reverse polarity protection
- Over-current protection
- ESD (static electricity) protection
This makes it safe for beginners to experiment without damaging components.
LED on Vumbua Synapse Kit
The Vumbua Kit has a built-in LED connected to Pin D10:
Built-in LED Specifications
- Color: Red (high visibility)
- Pin: Connected to ATmega328P Pin D10
- Resistor: 220Ω built-in on PCB
- Location: Near USB connector (labeled "LED")
- Purpose: Debugging and visual feedback
No Wiring Required!
One of the best features of the Vumbua Synapse Kit is that all basic components are pre-wired. You don't need to:
- Solder any connections
- Add resistors manually
- Use breadboard for basic lessons
- Worry about incorrect wiring
This lets you focus on programming and concepts rather than struggling with physical connections.
ATmega328P Microcontroller & Pin D10
The ATmega328P is the brain of your Vumbua Synapse Kit:
ATmega328P Pinout (Simplified)
Pin D10 is physically connected to PB1 on the ATmega328P chip.
Digital Pins on ATmega328P
The ATmega328P has 14 digital I/O pins (D0-D13):
- D0-D7: Port D (8 pins)
- D8-D13: Port B (6 pins)
- D10: Part of Port B (PB1)
- Can be: Input or Output
- Voltage: 5V when HIGH, 0V when LOW
Pin D10 Capabilities
Pin D10 has special capabilities beyond simple digital I/O:
- Digital Output: Turn LED on/off
- PWM Output: AnalogWrite() for dimming
- SPI: Can be used for SPI communication
- Timer: Connected to Timer1
Setting Up Arduino IDE
Before we write code, let's set up the development environment:
1. Download Arduino IDE
Download the latest Arduino IDE from the official website:
Download Arduino IDEChoose the version for your operating system (Windows, Mac, or Linux).
2. Install Vumbua Board Definition
The Vumbua Synapse Kit uses the ATmega328P, which is compatible with Arduino Uno settings:
- Open Arduino IDE
- Go to Tools → Board → Boards Manager
- Search for "Arduino AVR Boards"
- Install the latest version
3. Configure Board Settings
After installation, configure the board:
- Board: "Arduino Uno"
- Port: Select your COM port (Windows) or /dev/tty* (Mac/Linux)
- Programmer: "AVRISP mkII"
The Vumbua Kit will appear as an Arduino Uno because it uses the same ATmega328P microcontroller.
If you don't see a COM port:
- Make sure USB cable is securely connected
- Try a different USB port on your computer
- Install USB drivers if needed (Windows may need CH340 drivers)
- Restart Arduino IDE after connecting
Your First Program: Blink.ino
Now let's write the classic "Blink" program:
blink.ino
/* Vumbua Synapse Kit - Lesson 1: Blinking LED This program blinks the built-in LED connected to pin D10 Created: [Today's Date] Author: [Your Name] */ // Define LED pin - The built-in LED on Vumbua is connected to D10 const int ledPin = 10; // The setup function runs once when you power on or reset void setup() { // Initialize digital pin D10 as an output pinMode(ledPin, OUTPUT); } // The loop function runs repeatedly forever void loop() { // Turn the LED ON (HIGH = 5V) digitalWrite(ledPin, HIGH); // Wait for 1000 milliseconds (1 second) delay(1000); // Turn the LED OFF (LOW = 0V) digitalWrite(ledPin, LOW); // Wait for 1000 milliseconds (1 second) delay(1000); // The loop() function ends here and immediately starts again // creating an infinite blinking loop }
Timing Diagram (1Hz Blink)
This creates a 1Hz (once per second) blink pattern: 1 second ON, 1 second OFF.
Understanding Program Structure
1. Comments
// Single-line comment
/* Multi-line
comment */
Comments are notes for humans. The Arduino ignores them. Always comment your code to explain what it does!
2. Constants and Variables
const int ledPin = 10;
const means constant (won't change). int means integer (whole number).
We store the pin number (10) in a variable called ledPin.
3. setup() Function
void setup() { // Runs once at startup }
Runs only once when the board powers up or resets. Use it for initial setup like pin configuration.
4. loop() Function
void loop() { // Runs repeatedly forever }
After setup() finishes, loop() runs continuously
until power is removed. This is where your main program logic goes.
Pin Modes: INPUT vs OUTPUT
The pinMode() function tells the microcontroller how to use a pin:
OUTPUT Mode
When a pin is OUTPUT, the microcontroller can:
- Send voltage to external components
- Control LEDs, motors, buzzers
- Set pin to HIGH (5V) or LOW (0V)
- Provide up to 40mA of current
pinMode(pinNumber, OUTPUT);
INPUT Mode
When a pin is INPUT, the microcontroller can:
- Read voltage from sensors
- Detect button presses
- Read HIGH (≥3V) or LOW (≤1.5V)
- High impedance (very little current)
pinMode(pinNumber, INPUT);
You must call pinMode() for any pin you use, and you should
do it in the setup() function. If you forget, the pin might not work
correctly or could behave unpredictably.
digitalWrite() Function
The digitalWrite() function controls the voltage on a pin:
Syntax
digitalWrite(pinNumber, value);
Where value is either HIGH or LOW.
HIGH (5V)
Sets the pin to 5 volts. For our LED circuit:
- Current flows from pin → resistor → LED → GND
- LED turns ON
- Pin sources current (provides power)
digitalWrite(ledPin, HIGH);
LOW (0V)
Sets the pin to 0 volts (ground). For our LED circuit:
- No voltage difference across LED
- LED turns OFF
- Pin sinks current (acts as ground)
digitalWrite(ledPin, LOW);
digitalWrite() in Action
delay() Function for Timing
The delay() function pauses the program for a specified time:
delay() Examples
// Delay for 1000 milliseconds (1 second) delay(1000); // Delay for 500 milliseconds (0.5 second) delay(500); // Delay for 100 milliseconds (0.1 second) delay(100); // Delay for 10 milliseconds (very short) delay(10); // Delay for 1 millisecond (minimum practical) delay(1);
How delay() Works
When delay(1000) is called:
- The microcontroller stops executing your code
- An internal timer counts milliseconds
- After 1000ms, program execution continues
- Nothing else happens during the delay
Common Time Conversions
| Milliseconds | Seconds | Example Use |
|---|---|---|
| 10 | 0.01s | Button debouncing |
| 100 | 0.1s | Fast blinking |
| 500 | 0.5s | Medium speed |
| 1000 | 1.0s | Standard blink |
| 2000 | 2.0s | Slow blinking |
While delay() is running, the Arduino cannot do anything else.
It can't read sensors, check buttons, or update displays. For more advanced projects,
we'll learn non-blocking timing methods in later lessons.
Upload Code to Vumbua Synapse Kit
Now let's upload your first program to the Vumbua Kit:
1. Verify the Code
Click the Verify button (checkmark) in Arduino IDE. This compiles your code and checks for errors.
If you see "Done compiling" in the bottom panel, your code is correct.
2. Connect Vumbua Kit
Connect your Vumbua Synapse Kit to your computer using the USB Type-C cable. The power LED on the board should light up.
In Arduino IDE, select the correct COM port under Tools → Port.
3. Upload the Program
Click the Upload button (right arrow) in Arduino IDE. You'll see messages in the bottom panel:
- "Compiling sketch..."
- "Uploading..."
- "Done uploading."
The built-in LED (connected to D10) should start blinking!
When upload is successful:
- Arduino IDE shows "Done uploading"
- LED near USB port blinks during upload
- Built-in LED (D10) starts blinking pattern
- No error messages appear
Experiment with Blinking Variations
Now that you have the basic blink working, let's try some variations:
Fast Blink
digitalWrite(ledPin, HIGH); delay(100); // 0.1 second digitalWrite(ledPin, LOW); delay(100);
Creates a 5Hz blink (5 times per second)
Asymmetric Blink
digitalWrite(ledPin, HIGH); delay(200); // Short ON digitalWrite(ledPin, LOW); delay(800); // Long OFF
Heartbeat-like pattern
Morse Code "SOS"
// S: ... (three short) for (int i = 0; i < 3; i++) { digitalWrite(ledPin, HIGH); delay(200); digitalWrite(ledPin, LOW); delay(200); } delay(600); // Between letters // (Add O and S similarly)
Random Blink
digitalWrite(ledPin, HIGH); delay(random(100, 1000)); digitalWrite(ledPin, LOW); delay(random(100, 1000));
Uses random() for unpredictable timing
Try creating these patterns:
- Police light: Fast double blink, pause, repeat
- Breathing effect: Use analogWrite() with PWM (advanced)
- Binary counter: Use multiple LEDs to count in binary
- Your name in Morse code
Troubleshooting Common Issues
- Check power: Is USB cable connected? Is power LED on?
- Verify pin number: Is it definitely pin 10?
const int ledPin = 10; - Check pinMode: Did you set pin as OUTPUT in setup()?
- Test with simpler code: Try just
digitalWrite(10, HIGH);in setup() - Check LED orientation: The built-in LED is pre-wired correctly
- Check connection: Try different USB cable or port
- Install drivers: Windows may need CH340 drivers
- Select correct port: Tools → Port → (choose COMx)
- Restart Arduino IDE after connecting board
- Try another computer to isolate the issue
- Check delay values: Are they too short? Try delay(1000)
- Verify loop() structure: Should have HIGH→delay→LOW→delay
- Look for infinite loop: Check for while(1) or similar
- Check serial monitor: Is it interfering? Close it
- Reset the board: Press reset button on Vumbua
- Missing semicolons: Every statement ends with ;
- Case sensitivity: HIGH not high, OUTPUT not output
- Mismatched braces: Every { must have a }
- Misspelled functions: digitalWrite not digitalwrite
- Use Verify button: Fix all errors before uploading
Always debug systematically:
- Simplify: Reduce code to minimum test case
- Isolate: Test one thing at a time
- Verify: Use Verify button to check syntax
- Search: Copy error message and search online
- Ask: Visit OLSPACE community forum for help
Video Tutorial
Blinking LED Video Tutorial
Watch our step-by-step video guide for this lesson.
See the LED blinking in action and follow along with the instructor.
Watch on YouTubeCongratulations! What's Next?
You've Completed Lesson 1!
You've successfully:
- ✓ Set up Arduino IDE for Vumbua Kit
- ✓ Written your first Arduino program
- ✓ Controlled pin D10 as digital output
- ✓ Made an LED blink with precise timing
- ✓ Uploaded code to ATmega328P microcontroller
- ✓ Troubleshot common issues
Lesson 2: Push Button Input
Now that you can control outputs, learn to read inputs! In Lesson 2, you'll:
- Learn about digital inputs and pull-up resistors
- Read button presses on the Vumbua Kit
- Create interactive projects (button-controlled LED)
- Understand button debouncing techniques
- Build your first interactive circuit
Now that you know how to blink an LED, try these mini-projects:
- Night light: Blink slowly for a child's room
- Bicycle safety light: Fast blink for attention
- Timer indicator: Blink when time is up
- Morse code communicator: Send messages with blinks
- Status indicator: Different patterns for different states
Resources & Downloads
Download Complete Code
Get all the code variations from this lesson:
Mark this lesson as complete to track your progress through the Vumbua Synapse Kit curriculum: