30 Days Lost in Space → Help Center
30 Days Lost in Space Help Center
Component guides, wiring references, code explanations and fixes for the errors people hit most in 30 Days Lost in Space.
Components
Electronic parts reference: LEDs, resistors, sensors, and more
- 7-Segment Display — Think alarm clocks and old-school scoreboards. Seven LED segments light up in different combinations to show digits 0 through 9.
- DIP Switch — It looks like a row of tiny light switches, and that's basically what it is. Three switches give you eight possible combinations.
- HERO Board — The brain of every project in your kit — an open-source, Arduino Uno-compatible microcontroller board that runs every mission in the course.
- Keypad (4x4) — Sixteen buttons, but only eight pins. The trick is a clever row-and-column scanning technique, and once you get it, you can build password locks and menu…
- LED (Light Emitting Diode) — You'll use LEDs more than any other part in your kit. Here's how they work, why they need resistors, and how to not blow them up.
- OLED Display — This 0.96-inch screen packs 128x64 individually lit pixels, and it only needs two data wires to talk to your Arduino over I2C.
- Passive Buzzer — Want your HERO board to make noise? A passive buzzer turns electrical pulses into sound, and you control the pitch by changing the frequency.
- Photoresistor (LDR) — Cover it with your hand and the resistance shoots up. Shine a light on it and the resistance drops. That's how you give your board the ability to see.
- RGB LED — One component, millions of colors. An RGB LED lets you blend red, green, and blue light together, and the mixing happens in code.
- Resistor — Without resistors, your LEDs would fry and your circuits would short. Learn how to read their color bands and pick the right value.
- Rotary Encoder — A knob with no beginning or end — it clicks forever in either direction, and your code counts every click. Twenty clicks per full turn.
Coding Concepts
Programming fundamentals: variables, loops, functions, and logic
- Arrays — Store multiple values in a single variable. Arrays are essential for managing groups of LEDs, sensor readings, melodies, and sequences.
- Bits, Bytes, and Bitwise Operations — Binary makes more sense once you see it as light switches. This is your guide to binary counting, bitwise operators, hex notation, and the practical patterns…
- Debouncing Buttons — When you press a button once and your code registers it five times, that is bounce. Here is what causes it physically, what it looks like in your Serial…
- Functions — Organize your code into reusable blocks. Functions make programs easier to read, debug, and maintain.
- If/Else: Conditional Logic — Make your Arduino make decisions. If/else statements let your code choose different actions based on sensor readings and button presses.
- Loops: for and while — Repeat actions automatically. For loops count through sequences, while loops run until a condition changes. Essential for animations and scanning.
- State Machines — Your Arduino project needs to be in a mode, like locked vs unlocked or waiting vs entering a code.
- The map() Function — Convert a value from one range to another. Essential for translating sensor readings into LED brightness, servo angles, or display values.
- Variables & Data Types — How to store and work with data in Arduino. Learn about int, float, bool, char, and String, the building blocks of every program.
- Working with Strings on Displays — Getting numbers and text to show up correctly on your OLED or 7-segment display. How to convert variables to text, add leading zeros, format sensor readings…
- constrain() — Keeps a number within a range by clamping it. Too low becomes the minimum, too high becomes the maximum.
- millis(): Non-Blocking Timing — Replace delay() with millis() for responsive programs. Learn to run multiple tasks simultaneously without freezing your Arduino.
- random() and randomSeed() — Arduino's random() function does not give you truly random numbers. It gives you the same sequence every time unless you seed it.
- switch/case Statements — When your code needs to handle a bunch of specific values, like which switch position is active or which key was pressed, switch/case keeps things readable…
- tone() and noTone() — How to make your piezo buzzer produce actual sounds, play notes, and build melodies. Includes frequency ranges, a note table, the Timer2 conflict with PWM, and…
HERO Board Basics
Platform reference: pins, boards, IDE, and upload workflow
- Analog Input: analogRead — Read continuous values from sensors and potentiometers. The ADC converts voltages (0-5V) into numbers (0-1023) for your code.
- Digital I/O: pinMode, digitalRead, digitalWrite — The three core digital functions. Control LEDs, read buttons, and interface with on/off components using HIGH and LOW signals.
- PWM: Pulse Width Modulation — Simulate analog output using digital pins. Control LED brightness, motor speed, and servo positions with analogWrite().
- Serial Monitor — Your debugging lifeline. Print messages from your Arduino to the computer screen to see what your code is doing in real time.
Libraries
Software library documentation: display drivers, encoders, and more
- BasicEncoder: Rotary Encoder Library — Count pulses from rotary encoder knobs with minimal code. BasicEncoder handles debouncing and direction detection so you can focus on what to do with the turns.
- Keypad Library — Simplify matrix keypad scanning. The Keypad library handles row-column multiplexing so you can focus on what to do with the key presses.
- TM1637: 7-Segment Display Driver — Control 4-digit 7-segment displays with just 2 pins. Display numbers, time, and simple text for counters and clocks.
- Tone: Sound Generation — Generate square wave tones on any digital pin. The built-in tone() function is all you need to make buzzers beep, play melodies, and create sound effects.
- U8g2: OLED Display Library — The go-to library for controlling OLED and LCD displays. Draw text, shapes, and graphics on SSD1306 and other display controllers.
- Wire Library (I2C Communication) — The built-in Wire library lets your Arduino talk to I2C devices like OLED displays and sensors using just two wires: SDA and SCL.
Circuits
Circuit theory and patterns: wiring, schematics, and breadboards
- Breadboard Basics — How to use a solderless breadboard for prototyping circuits. Understand the internal connections, power rails, and best practices.
- I2C Communication — A two-wire protocol for connecting multiple devices. Use I2C to talk to OLED displays, sensors, and other peripherals on a shared bus.
- Ohm's Law — What Ohm's law actually says, in plain language — and how it decides every resistor value in your kit. Worked through on the exact LED circuit from Day 2.
- Series vs Parallel Circuits — Two fundamental ways to connect components. Series circuits share current; parallel circuits share voltage. Each has different effects.
- Shift Register: Pin Expansion — Control 8+ outputs using only 3 Arduino pins. Shift registers expand your I/O capacity for LED arrays and multi-digit displays.
- Voltage Dividers — Split a voltage into a smaller voltage using two resistors. Essential for reading sensors and level-shifting signals.
Troubleshooting
Something not working? Start here. Common problems and how to fix them.
- Buzzer Makes No Sound — Your buzzer is silent when it should be making a tone. Or it makes a quiet click when the code starts but nothing sustained.
- Code Compiles but Nothing Happens — Your code uploaded without errors. No red text, no warnings. But the Arduino does nothing. No LED, no serial output, no movement. Total silence.
- Compiler Error: expected ';' or Other Syntax Errors — You hit Verify or Upload and get red error text at the bottom of the Arduino IDE. The code will not compile.
- Display Shows Nothing (7-Segment / TM1637) — Your 4-digit 7-segment display is completely dark, or it shows the wrong numbers, or only some segments light up.
- Display Shows Nothing (OLED) — Your OLED display stays completely black after uploading your code. No text, no pixels, nothing. Or it worked before and stopped.
- My LED Won't Turn On — Your LED is completely dark. No light at all, not even a flicker. Or it was working five minutes ago and now it is dead.
- Serial Monitor Shows Weird Characters — You open the Serial Monitor and see garbage characters, squares, question marks, or nothing at all instead of the text your code should be printing.
- Upload Failed or Port Not Found — You hit Upload and get an error like 'programmer is not responding,' 'port not found,' or the port menu is grayed out. The code will not get to your board.