Apr 03

Arduino and EL Escudo

Another fixit type post.  Every so often I repurpose my Arduino and EL Wire for a new project, and each time I always forget how to properly get the EL_Escudo library resetup.  I should probably just fork the code on GitHub with the fixes that have been posted, but who remembers to do that.

So, the EL Escudo is a cool shield for the Arduino.  SparkFun sells it.  I highly recommend them.  There is a small bug in the library code that is fixed by bobmct’s post (http://www.sparkfun.com/products/9259#comment-4eaad859757b7fd35100ba5d):

“I realize this is a rehash of what others above have said, but I got mine to work by doing the following.

Getting the El Escudo to work
Two problems:
1. Must fix a mistake in the library code: Needed to make in EL_Escudo.cpp (thanks BMK):
void EL_EscudoClass::on(char channel)
{
pinMode(channel, OUTPUT);
digitalWrite(channel, HIGH);
}
void EL_EscudoClass::off(char channel)
{
pinMode(channel, OUTPUT);
digitalWrite(channel, LOW);
}
2. They also recommend GND and HVGND are tied together. Look at photo (thanks miku) http://dl.dropbox.com/u/3551240/el-escudo.JPG . With the code change made above I also tried to see if the El Scudo would work without this jumber (between GND and HVGND), and it did work and it did work without it. I was using the EL_Blink.pde example when testing this.
The above got things to work with a handheld 3V inverter (two AA battery powered) with the button pressed 3 times (a steady AC supply, no blinking) with the output of this inverter connected to the El Escudo shield’s “EL Driver Inverter Ouput” JST jack.
The Arduino was powered from a 5VDC wall transformer (1A capacity) with the barrel jack plug connected either on the Arduino’s barrel jack connector or connected to the El Scudo’s “EL Driver Raw Voltage” JST connector.
You will need to fabricate the strange El Wire plugs to JST plugs to make all the connections. In my experience above, the polarity was not a factor because the output from the inverter is AC and so is the input to the el wire.
Hope this helps.”

My only issue was with number 1.  Fixing that caused the main library to work again.

With the upgrade to Arduino 1.0, WConstants.h will throw an error since that isn’t being used anymore.  You should be able to safely change all WConstants.h to Arduino.h