An invisible beam. A watchful eye. A machine that barks when anything comes too close.
Enter the access code from the card inside your Beginner Kit (or from your GAMERIFT order email). Your name appears on every page and printout as the licensee.
Don't have a kit yet? Get the Beginner Kit, the code ships inside. Lost your code? Contact us with your order number.
Shop doors that ding when you walk in. Taps that run when your hands arrive. Robot vacuums that stop before hitting the wall. All of them use the same trick: shine an invisible light, watch for its reflection. Your kit's IR obstacle module is that trick on one small board, an infrared torch and an infrared eye, side by side. When something comes close, its reflection lands in the eye and the module shouts. Today you build a desk guard that notices an approaching hand and raises an alarm, the exact skill your final build needs.
Time: 45–60 minutes · Difficulty: 3/5 · You need: Lessons 08 and 10 done (buzzer, sensor tuning).
Infrared is light too red for human eyes. Your TV remote is an IR torch, press a button while filming it with your phone camera and you will see it flash (most phone cameras can see IR, try it, genuinely). The module's clear bulb transmits IR; the dark bulb receives. Close object, strong reflection, detection.
Here is the module's quirk: when it detects something, its OUT pin goes LOW, not HIGH. Many sensors and buttons signal this way (remember INPUT_PULLUP?). Engineers call it active low. It is not wrong, it is a dialect. Your code just needs to know which dialect its sensor speaks, and most modules have a little onboard LED that lights on detection, your cheat sheet while testing.
Unplug the USB. Module pins into the breadboard, read the labels on YOUR board (usually OUT, GND, VCC).
| From | To | Why |
|---|---|---|
| Module OUT pin | R3 pin 7 | The detection wire |
| Module VCC pin | R3 5V | Power for torch and eye |
| Module GND pin | R3 GND | Ground |
| R3 pin 8 | Active buzzer + leg · − leg to GND | The bark |
| R3 pin 13 | 220Ω resistor → LED long leg · short leg to GND | The visual alarm |
Point the module's two bulbs out across your desk, not at a nearby wall, or it will "detect" the wall forever.
// GAMERIFT Beginner Kit, Lesson 11: Guard Dog // Something comes close: flash and bark until it leaves. const int eyePin = 7; const int buzzerPin = 8; const int lampPin = 13; void setup() { pinMode(eyePin, INPUT); pinMode(buzzerPin, OUTPUT); pinMode(lampPin, OUTPUT); Serial.begin(9600); } void loop() { if (digitalRead(eyePin) == LOW) { // LOW = something is there (active low!) Serial.println("INTRUDER!"); digitalWrite(lampPin, HIGH); // flash... digitalWrite(buzzerPin, HIGH); // ...and bark delay(100); digitalWrite(lampPin, LOW); digitalWrite(buzzerPin, LOW); delay(100); // on-off-on-off = urgent } else { digitalWrite(lampPin, LOW); // all clear, stand down digitalWrite(buzzerPin, LOW); } }
Film the moment your hand triggers the guard for your lesson log. You now know every skill the final build needs. Stuck? Contact us with a photo.
No more step-by-step. Next lesson you get a specification, like a real engineer gets, and you build the full desk guardian on your own: watching, measuring, counting and sounding the alarm. Everything you have learned, in one machine. Then you film it, send it in, and earn your certificate.