Step 3: Arduino Sketch
You will need the following Arduino Libraries:
- AF_Wave and Wave
- String (formerly TextString)
Here is a run down for the pin connections on the Arduino with WAVE shield on top.
Communication
D0(RX) -> ioBridge Serial Board TX
D1(TX )-> ioBridge Serial Board RX
D2-D5 are used by the WAVE shield (they could be changed)
D2 -> LCS
D3 -> CLK
D4 -> DI
D5 -> LAT
xmas-box first 3 channels
D6 -> Channel 1
D7 -> Channel 2
D8 -> Channel 3
FM transmitter ON/OFF
D9 -> 10k resistor -> 2N2222 Base -- Collector and Emitter to FM transmitter switch
WAVE shield
D10 -> CCS
SD card WAVE shield communication (cannot be changed)
D11
D12
D13
Power
Gnd[0] -> Relay daisy chain.
5v pin -> FM transmitter positive
Gnd[1] -> FM transmitter ground
Gnd[2] -> ioBridge Smart Serial Board
Vu Meter
A0 -> R7 1.5K on the WAVE shield to measure output from amplifier. See image.
Analog pins 1-5 are used as digital out for xmas-box channels
A1 = D15 -> Channel 4
A2 = D16 -> Channel 5
A3 = D17 -> Channel 6
A4 = D18 -> Channel 7
A5 = D19 -> Channel 8
Wave shield speaker (mono) to FM transmitter input
xmas_box.pde10 KB
Remove these ads by
Signing Up









































Visit Our Store »
Go Pro Today »




xmas_box.cpp: In function 'void playComplete(char*)':
xmas_box:167: error: 'class String' has no member named 'append'
xmas_box:196: error: 'class String' has no member named 'append'
xmas_box:198: error: 'class String' has no member named 'append'
xmas_box:199: error: 'class String' has no member named 'append'
xmas_box:200: error: cannot convert 'String' to 'char*' in assignment
I'm using arduino-0021 which supposedly has string class incorporated in it. Do I need to modify the code? If so, please tell me how.
Let me see if I found something.
I replaced all the "append" references with "concat" in your code, and that seemed to eliminate the errors: "no member named 'append'".
However, I am still getting the following error:
xmas_box.cpp: In function 'void playComplete(char*)':
xmas_box:201: error: cannot convert 'String' to 'char*' in assignment
The line that the compiler stops at is:
track = tmpTrack;
I'm sorry to be posting so many questions, but I really want to get this thing working for my lights this year, and I am clueless as to what this error has to do with the above line of code. Do you have any ideas?
I feel like I might have bitten off more than I can chew with this project, because my understanding of computer code is almost non existent, which is forcing me to try to fix the code by trial and error. I can't figure out why I would be the only one getting errors. From the other posts, I assume other people have more recently built the xmas box and used the Arduino 0021 compiler, but maybe not. I'm not opposed to using 0017, but even with that compiler I get errors because I can't download the same string library you used.
If you wouldn't mind replying just to let me know you are reading my posts I would appreciate it, even if you don't know how to help me yet. I will try picking this project up again at a later date if necessary when I have some programming under my belt. I've already invested in all the materials and partially assembled the instructable though, so I'm determined to complete it eventually, even if I have to wait 'til next year to get to use it.
Thanks in advance.
Keep up at it...Try the Arduino forums as well...I will let you know if i run in the same issue and how i solve it.
-Noel
The instructable says to use pin connection D10 for LCS. It looks like from the picture that D10 should be connected to CCS. Is this correct?
The link for the string library you have in your instructable only takes you to a page that tells you that the TextString library is now obsolete. String libraries are now included natively with the code compiler.
The instructions for the use of toCharArray() on the Arduino site are limited and some say a bit misleading, so I'll just share what I changed to make the program compile and load with the new string library.
Okay, I seem to have fixed it, or at least changed it to where the code compiles and loads on the Arduino. I replaced the following line of code:
track=tmpTrack;
with this:
char tracklngth[tmpTrack.length() + 1];
tmpTrack.toCharArray(tracklngth, tmpTrack.length() + 1);
track = tracklngth;
Sorry if this is an abomination to all seasoned programmers out there, but it's the best I could come up with. I'm sure it could have been done in one or two lines, but I'm in a hurry to get the xmas_box working.
I've heard good things about gEDA (http://www.gpleda.org/) on Linux, but I've not tried it yet myself.
There are also some schematic/PCB editors made by PCB companies that you can possible export an image from after creating the schematic.
I hope that helps.