Morse code treasure hunt beacons
Build it step by step
0 of 7 doneProgram one chip
Use Arduino as ISP.
Test the Morse
Flash HELLO and read it back.
Write the clues
One per beacon.
Build three beacons
Chip, LED, buzzer and holder.
Make a Morse card
A table for the players.
Hide the beacons
Agree places in advance.
Run the hunt
With adult supervision.
How do you build a morse code treasure hunt beacons?
Hidden beacons flash or beep Morse clues, and players decode them to find the next location. You need ATtiny85-20PU microcontroller × 3, LED 5 mm red × 3, Passive buzzer × 3, Resistor 220 Ω × 3, Battery holder 2 × AA × 3 and AA alkaline battery × 6. It takes 7 steps and about 120 minutes.
- Level
- Intermediate
- Time
- About 120 min
- Parts
- 6
Parts list
- Integrated CircuitsBuy
- SemiconductorsBuyLED 5 mm red × 3
- Motors & ActuatorsBuyPassive buzzer × 3
- PassivesBuyResistor 220 Ω × 3
- PowerBuy
- BatteriesBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| ATtiny85 pin 8 | Battery plus | Power (3 V from 2 AA cells) |
| ATtiny85 pin 4 | Battery minus | Ground |
| ATtiny85 pin 5 (PB0) | 220 Ω, then LED to ground | Light |
| ATtiny85 pin 6 (PB1) | Passive buzzer to ground | Sound |
| ATtiny85 pin 1 | Not connected (reset) | Leave floating or pulled high |
Code
Morse timing is based on one unit: a dot is one unit, a dash is three, the gap between parts of a letter is one, between letters three, and between words seven. Each beacon repeats its clue with a five-second pause, so players can arrive at any point. Burn a different message into each of the three ATtiny85 chips, and hand players a Morse card. Two AA cells give 3 V, which suits the ATtiny85 and a red LED through 220 Ω; the passive buzzer is driven with tone() at 700 Hz. Hide beacons in safe, open places with permission, never near roads or water, and have an adult on every team.
Runs on a virtual ATtiny85 in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).
// Morse beacon for ATtiny85. Core: ATTinyCore, 1 MHz internal, program with Arduino as ISP. Change MSG per beacon.
const char MSG[] = "GO TO THE OLD LIBRARY";
const int LED = 0, BUZ = 1;
const int UNIT = 200; // milliseconds per dot
const char* CODE[] = {".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-","...-",".--","-..-","-.--","--.."};
void tone_on(int ms) { digitalWrite(LED, HIGH); tone(BUZ, 700); delay(ms); noTone(BUZ); digitalWrite(LED, LOW); }
void setup() { pinMode(LED, OUTPUT); pinMode(BUZ, OUTPUT); }
void loop() {
for (int i = 0; MSG[i]; i++) {
char c = MSG[i];
if (c == ' ') { delay(UNIT * 7); continue; }
if (c < 'A' || c > 'Z') continue;
const char* s = CODE[c - 'A'];
for (int k = 0; s[k]; k++) { tone_on(s[k] == '.' ? UNIT : UNIT * 3); delay(UNIT); }
delay(UNIT * 3);
}
delay(5000); // pause, then repeat the clue
}Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Power on | Flashes and beeps the clue |
| Timing | Letters and words are clearly separated |
| Repeat | Five-second pause then again |
| Battery | Lasts many hours |
If it does not work
No flashes
Check chip orientation and power.
Wrong speed
Check the clock setting before burning.
Buzzer silent
Use a passive buzzer, not an active one.
Garbled letters
Check the code table.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the morse code treasure hunt beacons?
ATtiny85-20PU microcontroller × 3, LED 5 mm red × 3, Passive buzzer × 3, Resistor 220 Ω × 3, Battery holder 2 × AA × 3 and AA alkaline battery × 6.
How long does the morse code treasure hunt beacons take to build?
About 120 minutes for a intermediate maker, in 7 steps.
How do I know the morse code treasure hunt beacons works?
Power on: Flashes and beeps the clue. Timing: Letters and words are clearly separated. Repeat: Five-second pause then again.
No flashes: what should I check?
Check chip orientation and power.
Wrong speed: what should I check?
Check the clock setting before burning.
Buzzer silent: what should I check?
Use a passive buzzer, not an active one.
Garbled letters: what should I check?
Check the code table.
