Saturday, September 08, 2012

Cobalt RaQ3 Frontpanel

To replace my current network router, I'm planning to maybe put a Raspberry Pi in the case of a Cobalt RaQ I have standing around since half a eternity.

Don't ask me why, but I spent way too much time (~8 hours) chasing the pinout of the RaQ and putting the awful lot of pins to a Arduino I often use for prototyping. Now I can write to the LCD, monitor button presses and let the LED blink. Because that's the most important thing for a router to do, in a closed network-rack, in the cellar, where the central heating is sitting. And none ever goes to look. Enough for today, I'll most likely put it back in the box I got it from, so that the project can be continued 2014 :-(.

Code is at github.

From chris' blog

From chris' blog

5 comments:

Wahnsinnnnnn said...

Thank you for your work!

I think it will usefull for me. :)

Unknown said...

Trying to compile this but maybe I am doing it wrong. Can you provide any pointers? Here is what I get:

whiterabbit avr_cobalt_panel-master]$ make
Makefile:35: avr-cobalt-panel.d: No such file or directory
Makefile:35: hd44780.d: No such file or directory
Makefile:35: cobalt_buttons.d: No such file or directory
Makefile:35: cobalt_leds.d: No such file or directory
Makefile:35: serial.d: No such file or directory
Makefile:35: menu.d: No such file or directory
Makefile:35: protocol.d: No such file or directory
avr-gcc -o protocol.d -MM protocol.c
avr-gcc -o menu.d -MM menu.c
avr-gcc -o serial.d -MM serial.c
avr-gcc -o cobalt_leds.d -MM cobalt_leds.c
avr-gcc -o cobalt_buttons.d -MM cobalt_buttons.c
avr-gcc -o hd44780.d -MM hd44780.c
avr-gcc -o avr-cobalt-panel.d -MM avr-cobalt-panel.c
avr-gcc -mmcu=atmega328p -Os -Wall -g -DF_CPU=16000000UL -c -o avr-cobalt-panel.o avr-cobalt-panel.c
avr-cobalt-panel.c:31:1: error: unknown type name 'prog_char'
prog_char hello_one[] = "avr-cobalt-panel";
^
avr-cobalt-panel.c:31:1: error: wide character array initialized from non-wide string
avr-cobalt-panel.c:32:1: error: unknown type name 'prog_char'
prog_char hello_two[] = "github/vogelchr";
^
avr-cobalt-panel.c:32:1: error: wide character array initialized from non-wide string
avr-cobalt-panel.c: In function 'main':
avr-cobalt-panel.c:47:20: warning: passing argument 1 of 'hd44780_data_PSTR' from incompatible pointer type
hd44780_data_PSTR(hello_one,16);
^
In file included from avr-cobalt-panel.c:24:0:
hd44780.h:44:13: note: expected 'const char *' but argument is of type 'int *'
extern void hd44780_data_PSTR(PGM_P data,uint8_t len);
^
avr-cobalt-panel.c:49:20: warning: passing argument 1 of 'hd44780_data_PSTR' from incompatible pointer type
hd44780_data_PSTR(hello_two,15);
^
In file included from avr-cobalt-panel.c:24:0:
hd44780.h:44:13: note: expected 'const char *' but argument is of type 'int *'
extern void hd44780_data_PSTR(PGM_P data,uint8_t len);
^
: recipe for target 'avr-cobalt-panel.o' failed
make: *** [avr-cobalt-panel.o] Error 1

Unknown said...

That's a known regression when using newer avr-libc versions. If you search for it on the internet, you'll find how to fix it, for example this here:

http://tuxgraphics.org/electronics/201207/prog_char.shtml

Unknown said...

Thanks a lot! Your code is working great now! I added 330 Ohm resistors to the 4 LEDs that didn't have any and now they all look about the same brightness. Now to figure out a use for this thing ;)

Unknown said...

I was unable to get this to compile correctly on OSX using any version of Crosspack/AVRMacPack. It would compile, but once flashed, I would get garbage on my LCD, and the buttons wouldn't return anything. Rather than tracking down the problematic code, I just compiled it on my Windows VM using AVRToolchain 3.2.3 from http://images.tuxgraphics.org/avrtoolchain-3.2.3/