I have some SA6432 switches from http://www.e3-keys.com, and awaiting for parts to convieniently hook them up.
I'm looking forward to see them working, but they're faily complicated to use. For me at least. I'm posting my first real attempt to a sketch, so have some mercy on the newby?...
Is anyone using the SA series switches?
The SA-'s need a clock signal while recieving data with a minimum rate of 60000. How do I make this?
The biggest to-do-job: graffics and fonts need to be sent in a specific size bitmap format. It would be such a relief if someone would post some fonts here... I'll get back here with the specific required specifications.
/* Color set for e3-keys' SA-series of RGB-lit LCD switches. (electri-fire fecit 2008) UNFINISHED!!!
This sketch is set up for SA6432. Datasheets and application notes at http://www.e3-keys.com
*/
int DataPin = 0;
int ClockPin = 1; // to do: make 60000 Baud clock for SA6432 for synchronisation
void setup ( )
{
Serial.begin (60000) ; // required Minimum speed is 60000, Maximum speed 2 MBaud
}
void loop ()
// The function for sending color data to SA6432
{
int color = (00000000);
/* Stores color setting for Red, Green and Blue.
Two bits set intensity for each color, in this format: 00RRGGBB (order may have to be reversed)
00 = off 01 = low 10 = medium 11 = high
example: 00111000 . meaning: Red: high intensity, Green medium intensity, Blue off. This would yield Orange.
*/
int colorPrevious = (00000000); // here to check if there's been a change
if (color != colorPrevious); // Hey, a change. So now send the new color
{
Serial.print( 0x41); // send "color command" to SA6432
Serial.print (color, BIN);
Serial.print (0x43); // send "end transmission command" to SA6432
color = colorPrevious ; // All done! Ready for new color changes. The color that was set is retained at SA6432.
delay (50); // determines refresh rate for color set
}
{ // Demo function to change "color" to be sent
int analogPin = 2; // select the input pin for the potentiometer
byte analogValue = (00000000); // variable to store the value coming from the sensor
analogValue = analogRead (analogPin);
color = analogValue/4; // range converter: color has values 0-63 (6 bits) , analogValue has 0-255 .
}
}