Electronics Starter Lab — Learn the Fundamentals
ComponentsFundamentalsEducation
Five hands-on exercises that teach the basics behind every electronics project: light an LED, read a button, read a knob, dim an LED with PWM, and switch a larger load with a transistor. Not one finished build, but the skills every build uses.
What you'll learn
- Wire an LED safely with a current-limiting resistor
- Read a push button and handle contact bounce
- Read an analog knob with the ADC
- Dim an LED with PWM
- Switch a larger load with an NPN transistor
9 real parts included
Total for this kit: 2,059.00 ฿
Doesn't include any order discount you may get at checkout.
What you'll need
ESP32-C3 SuperMini Development Board — Wi-Fi & Bluetooth, USB-C
670.00 ฿
830-Point Solderless Breadboard
125.00 ฿
Jumper Wire Kit — Male-Male, Male-Female, Female-Female
220.00 ฿
USB-C Data & Charging Cable — 1m
180.00 ฿
5mm LED — Single Color, Yellow / Green (100-Pack)
149.00 ฿
Resistor Assortment Kit — 30 Values, 1/4W
190.00 ฿
Tactile Push Button Switches — 12×12×7.3mm
85.00 ฿
10K Potentiometer with Knob — WH148
210.00 ฿
NPN/PNP Transistor Kit — BC-Series, Choose Your Type
230.00 ฿
Wiring Diagram
Starter Code
// ===== Exercise 1: Blink an LED =====
// Exercise 1: Blink an LED
#define LED_PIN 4 // adjust to match your wiring if different
void setup() {
pinMode(LED_PIN, OUTPUT);
}
void loop() {
digitalWrite(LED_PIN, HIGH);
delay(500);
digitalWrite(LED_PIN, LOW);
delay(500);
}
// ===== Exercise 2: Read a Button to Light an LED =====
// Exercise 2: Button controls an LED
#define LED_PIN 4
#define BUTTON_PIN 5 // adjust to match your wiring if different
void setup() {
pinMode(LED_PIN, OUTPUT);
pinMode(BUTTON_PIN, INPUT_PULLUP);
}
void loop() {
bool pressed = (digitalRead(BUTTON_PIN) == LOW);
digitalWrite(LED_PIN, pressed ? HIGH : LOW);
}
// ===== Exercise 3: Read a Potentiometer =====
// Exercise 3: Read a potentiometer and print to Serial
#define POT_PIN 0 // adjust to match your wiring if different
void setup() {
Serial.begin(115200);
}
void loop() {
int raw = analogRead(POT_PIN);
Serial.print("Pot raw value: ");
Serial.println(raw);
delay(200);
}
// ===== Exercise 4: Potentiometer Controls LED Brightness (PWM) =====
// Exercise 4: Potentiometer controls LED brightness via PWM
#define POT_PIN 0
#define LED_PIN 4 // adjust to match your wiring if different
const int PWM_FREQ = 5000;
const int PWM_RESOLUTION = 8; // 0-255 duty range
void setup() {
Serial.begin(115200);
// Arduino-ESP32 core 3.x pin-based LEDC API:
ledcAttach(LED_PIN, PWM_FREQ, PWM_RESOLUTION);
}
void loop() {
int raw = analogRead(POT_PIN); // 0-4095
int brightness = map(raw, 0, 4095, 0, 255); // scale to 8-bit PWM duty
ledcWrite(LED_PIN, brightness);
Serial.print("Pot: "); Serial.print(raw);
Serial.print(" Brightness: "); Serial.println(brightness);
delay(50);
}
// ===== Exercise 5: NPN Transistor as a Digital Switch =====
// Exercise 5: NPN transistor switches an LED group from a digital pin
#define SWITCH_PIN 7 // adjust to match your wiring if different
void setup() {
pinMode(SWITCH_PIN, OUTPUT);
}
void loop() {
digitalWrite(SWITCH_PIN, HIGH); // transistor conducts, LED group ON
delay(1000);
digitalWrite(SWITCH_PIN, LOW); // transistor cuts off, LED group OFF
delay(1000);
}Not sure about a step? Ask us