Woohoo, my little Wiichuck adpter for experimenting with the Wii nuchuck made it on TV, thanks to my buddy John Park and Make: TV.
See the Makezine blog post with the segment, or watch it here:
Maker Workshop – Personal Flight Recorder on Make: television from make magazine on Vimeo.
Helping my Son build the flight recorder, but having issue with the program. I get the following error message when trying to upload or Verify.
“OUTPUT” was not declared in this scope.
LCDSerial.cpp:30:24: error: WConstants.h: No such file or directory
LCDSerial.cpp: In member function ‘void LCDSerial::begin(long int)’:
LCDSerial.cpp:71: error: ‘OUTPUT’ was not declared in this scope
LCDSerial.cpp:71: error: ‘pinMode’ was not declared in this scope
LCDSerial.cpp:72: error: ‘HIGH’ was not declared in this scope
LCDSerial.cpp:72: error: ‘digitalWrite’ was not declared in this scope
LCDSerial.cpp: In member function ‘void LCDSerial::print(uint8_t)’:
LCDSerial.cpp:139: error: ‘byte’ was not declared in this scope
LCDSerial.cpp:139: error: expected `;’ before ‘mask’
LCDSerial.cpp:143: error: ‘LOW’ was not declared in this scope
LCDSerial.cpp:143: error: ‘digitalWrite’ was not declared in this scope
LCDSerial.cpp:146: error: ‘mask’ was not declared in this scope
LCDSerial.cpp:148: error: ‘HIGH’ was not declared in this scope
LCDSerial.cpp:156: error: ‘HIGH’ was not declared in this scope
I did a quick fix for the code stop issue.
I copied the twi.h and twi.c libraries from the arduino folder into the sketch folder and it worked like a charm.
The code’s a little larger now but works fine on the ATMEGA328P.
Andrew
Hmmm, well at least that part works. This code was written to be as small as possible because it was for the older 8kB Arduino (and originally included a GPS library too). I think your first instinct of the code just getting stale compared to Arduino’s progress. Unfortunately I don’t have any time to work on this until after Maker Faire. If you get it working, let me know and I’ll make changes to any published copies of the source I have access too.
btw, if you want to see the original sketches with the GPS and other bits, you can check out the Google Code repository:
http://code.google.com/p/todbot/source/browse/#svn/trunk/GPSWiiRecorder
Thanks for the quick response.
I tried the demo sketch and others and they all work good, reading data and such.
Still it will not transmit to the LCD.
I have the Exact same SparkFun LCD in the video wired correctly.
Hi Neverhood,
You should first try out the WiichuckDemo sketch on the Wiichuck adapter page to make sure you can get your Wiichuck working using the normal Arduino Wire library.
Hi.
Got the source downloaded, fixed PC ,PC2 ,PC3 stuff and compiled but when I run it its gets stuck on the code line “twi_writeTo( wiichuck_addr, tx_buf, 2, 1); // blocking write” on “wiichuck_funcs.h” for some reason…
I’m guessing that Arduino has changed again and something small has to be fixed.
P.S. The LCD gets stuck on “WiiCoasterUI” and I’ve inserted a little test line to figure where it stopped.
Hi Andreas,
Arduino changed a little since the code was written. Change all occurrences of “PC” to “PORTC” and things should compile. (e.g. change “PC2” to “PORTC2” and “PC3” to “PORTC3”)
Hello.
Tried to download the files for the Personal Flight Recorder.
I get an error : PC2 was not declared in this scope..
Please help..
Andreas
I don’t reckon that the circuit board is availible as a jpg or pcb format of some sort for us DIYers ?
Glad to see the little adapter board got its 5 minutes of fame!