Hello everyone...
I have a question about serial communication.
I have a dot matrix thats on a mini pro and would like to send it serial data to display from a picaxe but i'm not sure how i should send that data, everything i've tried so far has failed and wondering if someone could help me figure out whats going on.
Using the serial monitor from the pc some what works..
this is the code from the picaxe 08m2:
main:
serout 0,t9600_16,("test")
Pause 3000
goto main
and the main code in the arduino:
void setup(){
m.init(); // module initialize
m.setIntensity(0); // dot matix intensity 0-15
Serial.begin(9600); // serial communication initialize
}
void loop(){
while (Serial.available() > 0){
byte c = Serial.read();
Serial.println(c, DEC);
printCharWithShift(c, 100);
}
/*
delay(100);
m.shiftLeft(false, true);
*/
}
void printCharWithShift(char c, int shift_speed){
if (c < 32) return;
c -= 32;
memcpy_P(buffer, CH + 7*c, 7);
m.writeSprite(32, 0, buffer);
m.setColumn(32 + buffer[0], 0);
for (int i=0; i<buffer[0]+1; i++)
{
delay(shift_speed);
m.shiftLeft(false, false);
}
}
void printStringWithShift(char* s, int shift_speed){
while (*s != 0){
printCharWithShift(*s, shift_speed);
s++;
}
}
MaxMatrix.rar (4.39 KB)