This is an old revision of the document!
Inspired by the poem: Un Petit Caneton - Mango Train (in French)
In the quiet of a spare room, a world is being pieced together. Beneath the soft glow of tealights and the hum of imagination, a little duckling (un petit caneton) prepares to prove that the forest is not a place to fear, but a place to call home.
The forest begins in a very dark night (nuit bien noire). As the duckling waddles (se dandinait) across the board, his courage manifests as light.
The duckling is not alone in these woods. Hidden in the deep shadows are resources and friends in need, such as the Rat, the Squirrel, and the Rabbit.
The mission is to illuminate 80% of the forest before the dawn breaks (l’aube se pointe).
As the game reaches its climax, the forest lights undergo a global transition from Deep Teal/Night Blue to Bright Orange and White. Once the forest is aglow, the predators realize the duckling is truly the master of these places (maitre de ces lieux). As the sun rises, it is they who will cry: “Run for your lives!” (Sauve qui peut!)
The game logic is powered by a cost-effective PIC microcontroller (such as the PIC16F series). These chips offer enough I/O ports to manage the LED grid and sensor inputs from the conductive board.
/* Hardware Configuration */ #define _XTAL_FREQ 8000000 // Using a 8MHz internal clock for power efficiency #include <xc.h> /* Primary Color Palette (GRB format) */ const uint32_t COLOR_NIGHT = 0x000033; // Deep Teal const uint32_t COLOR_DUCK_PATH = 0xD7FF00; // Warm Gold const uint32_t COLOR_PREDATOR = 0x004B82; // Cold Purple const uint32_t COLOR_CRITTER = 0xFFFF00; // Cyan Pulse (Target Friend) const uint32_t COLOR_NUT_GLOW = 0x33FF00; // Pale Green (Target Nut) /* Variables */ uint8_t noids = 0; uint8_t spirit_shield = 0; // "Stickier" light duration // Logic: // 1. Scan proximity to hidden objects (Critters/Nuts). // 2. If close, pulse target LED with Cyan or Pale Green. // 3. Handle 'Thunder' flash via Timer interrupt for random atmospheric strikes. void __interrupt() ISR(void) { if (TMR2IF) { // Atmosphere: Brief strobe to simulate lightning TMR2IF = 0; } }