Archived Geocache GC3MBEF (Electric Dongle)

"Das Abenteuer des Agent Finley"


The technical stages of this geocache disappeared several times I decided to archive this cache.

Because there has been a lot of effort in developing this cache I thought it might be interesting for the croud to see what's inside the box.


First assembling on the breadboard

The first step was to put everything together on the breadboard and check if I realize what I had in mind.

There should be a spinning 7 digit display and every time a dongle is connected the display shows a number.

For that I shortened for every dongle a different wire, which was quite an easy but effective solution.



Drawing the PCB for the project

This was one of the first PCBs I have ever drawn.

My next PCBs were made with Eable, but this one was made in a graphic tool.



Putting everything in a nice frame

After the PCB was ready and the breadboard constellation worked, it was time to put everything in a nice frame.

On the top I put a little transparent plastic for protection of the electric.

As connection I used a male and female DB9 connector.

The Dongle was originally designed for turing on a desk light.



Writing the code

With programming the ATMega168 the parts would not do a thing.

As power supply I used a 9V battery.

Here you can see the tiny and simple code which I used for that cache.


Main Program

View source
// 7_segment_display.c
// for NerdKits with ATmega168
#define F_CPU 14745600
#include <avr/io.h>
#include <inttypes.h>
#include <util/delay.h>
#include "../libnerdkits/lcd.h"
#include "../mylibs/7segment.h"
#include "../mylibs/7segment.c"
// PC4 -- LED (g)  7 Segment Kathode
// PC3 -- LED (f)  7 Segment Kathode
// PC2 -- LED (e)  7 Segment Kathode
// PC1 -- LED (a)  7 Segment Kathode
// PC0 -- LED (b)  7 Segment Kathode
// PD2 -- LED (d)  7 Segment Kathode
// PD3 -- LED (DP) 7 Segment Kathode
// PD4 -- LED (c)  7 Segment Kathode    
int main(void) {
	DDRC  = 0b00011111; // Pinb.0,1,2,3,4 auf Ausgang schalten, Rest auf Eingang  
	DDRD  = 0b00011100; // Pind.2,3,4 auf Ausgang schalten, Rest auf Eingang
	// PB5 als Eingang
	DDRB &= ~(1<<PB4);
	DDRB &= ~(1<<PB3);
	DDRB &= ~(1<<PB2);
	// turn on the internal resistors for the pins
	PORTB |= (1<<PB4); // turn on internal pull up resistor
	PORTB |= (1<<PB3); // turn on internal pull up resistor
	PORTB |= (1<<PB2); // turn on internal pull up resistor
  while(1) {
			PORTC = 0b11111101;
			PORTC = 0b11111110;
			PORTD = 0b11101111;
			PORTD = 0b11111011;
			PORTC = 0b11111011;
			PORTC = 0b11110111;
		while(!(PINB & (1<<PB4))) // When Button pressed
		while(!(PINB & (1<<PB3))) // When Button pressed
		while(!(PINB & (1<<PB2))) // When Button pressed
  return 0;