Blink an LED
One second on, one second off, forever. Where everything starts.
Board
arduino_unoDev boardATmega328P5 V logic
Dev board — certification is judged on the target module
Run them in the browser, no login needed.
One second on, one second off, forever. Where everything starts.
Prints D2's state to the serial monitor as 0 or 1, over and over.
Reads the potentiometer on A0 as a number from 0 to 1023.
analogWrite walks D13's brightness up and back down forever.
Converts the 0–1023 reading into volts and prints that instead.
D13 lights only while the button is pressed.
Reads a button with INPUT_PULLUP and no external resistor — pressed reads 0.
A button bounces on contact; waiting 50 ms turns the noise into one press.
Detects the moment a button goes down, not whether it is down.
Times the blink instead of stopping — the shape you need to do two things at once.
Pitches and lengths live in arrays and are played in order.
Maps the A0 reading straight onto an audible frequency.
Reads several inputs and sounds the note belonging to whichever is pressed.
tone() drives one pin at a time; noTone() frees it for the next.
The A0 reading is used directly as the delay, so turning it speeds the blink up.
Scales 0–1023 down to 0–255 for analogWrite. This is what map() is for.
Two for-loops walk the brightness up and back — the same result as Fade, written differently.
Averages the last ten samples. Every sensor project meets this problem.
Learns the lowest and highest values it sees in the first five seconds, then scales to those.
The higher the reading, the more LEDs light. The simplest way to see a number.
The LED comes on only when the reading crosses a number you chose. if in its simplest form.
A for-loop runs along a row of LEDs and back. This is what loops are for.
Stays inside the while-loop for as long as the button is down.
Splits a reading into ranges and does something different in each — tidier than a stack of ifs.
Sending a–e over serial lights the matching LED.
Lists the LED pins once and walks the list, instead of naming each pin by hand.
D13 lights up while the button is held. Start here.
Turn the potentiometer and the servo horn follows it to the same angle.
The darker the light sensor reads, the brighter the LED — the brightness is an analogWrite duty cycle.
A PIR sensor lights the lamp and holds it on for three seconds after the last movement.
An ultrasonic range finder beeps at shorter intervals as something gets closer, and lights an LED inside 30 cm.
Every press adds one, shown on a four-digit seven-segment display.
Pressing the button turns the NeoPixel ring blue and plays two tones.
A BME280 prints to serial and an OLED every two seconds.
The servo follows the potentiometer; DHT22 humidity goes to the LCD.
The IR remote's +/- drives a 12 V fan; it halves itself when the room goes dark.
The DS3231's time shows on a 4-digit display, but only while the PIR sees someone.
Accelerometer samples stream into motion.csv on a microSD; the LED blinks while logging.
The relay closes when the DS18B20 passes 28 °C; an ultrasonic sensor measures distance too.
Prints each way of constructing a String, one after another.
Adds numbers and text with + to build one sentence.
Uses += to keep adding to the end of a string.
Measures a string's length and trims the front when it grows.
Shows how much shorter a string gets once the spaces at each end go.
Locates a character or word inside a string by position.
Takes just the part of a string you asked for.
Swaps one piece of a string for another.
Converts a whole string to upper or lower case at once.
Shows what ==, > and < do to text — not the same as with numbers.
Tests whether a string begins or ends with something.
Decides whether a single character is a digit, a letter, or a space.
Converts what arrives over serial into an integer you can do maths with.
Reports over serial whether what arrived is a digit, a letter, or punctuation.