Hi.
I am trying to get my MML24R to switch between 4 preprogrammed pages when grounding 4 corresponding I/O pins on a VMA100 arduino uno board.
I have a Serial RS232 to TTL converter connecting the two, but the display does not change pages.
I have not been able to find documentation on the format of the serial communication, but using “Serial Port Monitor” while changing pages from the “NewSign” software revealed the hex strings applied in the sketch below. Changing pages from the “NewSign” software works fine.
The arduino serial monitor shows the hex strings being transmitted.
Using my trusty old oscilloscope i can see data being transmitted on the tx pin of the RS232 converter, but i am unable to decode it.
Example of string being sent:
int pushButtonBr = 2;
int pushButtonLG = 3;
int pushButtonHG = 4;
int pushButtonEv = 5;
byte messageBr[] = {0x3C, 0x49, 0x44, 0x30, 0x30, 0x3E, 0x3C, 0x52, 0x50, 0x44, 0x3E, 0x34, 0x32, 0x3C, 0x45, 0x3E};
byte messageNormal[] = {0x3C, 0x49, 0x44, 0x30, 0x30, 0x3E, 0x3C, 0x52, 0x50, 0x44, 0x3E, 0x34, 0x31, 0x3C, 0x45, 0x3E};
byte messageEv[] = {0x3C, 0x49, 0x44, 0x30, 0x30, 0x3E, 0x3C, 0x52, 0x50, 0x44, 0x3E, 0x34, 0x35, 0x3C, 0x45, 0x3E};
void setup() {
Serial.begin(9600);
pinMode(pushButtonBr, INPUT);
pinMode(pushButtonBr, INPUT_PULLUP);
pinMode(pushButtonLG, INPUT);
pinMode(pushButtonLG, INPUT_PULLUP);
pinMode(pushButtonHG, INPUT);
pinMode(pushButtonHG, INPUT_PULLUP);
pinMode(pushButtonEv, INPUT);
pinMode(pushButtonEv, INPUT_PULLUP);
byte messageBr[] = {0x3C, 0x49, 0x44, 0x30, 0x30, 0x3E, 0x3C, 0x52, 0x50, 0x44, 0x3E, 0x34, 0x32, 0x3C, 0x45, 0x3E};
}
void loop() {
int buttonStateBr = digitalRead(pushButtonBr);
int buttonStateLG = digitalRead(pushButtonLG);
int buttonStateHG = digitalRead(pushButtonHG);
int buttonStateEv = digitalRead(pushButtonEv);
if (buttonStateEv == LOW and buttonStateBr == LOW)
byte messageNormal[] = {0x3C, 0x49, 0x44, 0x30, 0x30, 0x3E, 0x3C, 0x52, 0x50, 0x44, 0x3E, 0x34, 0x31, 0x3C, 0x45, 0x3E};
Serial.write(messageNormal, sizeof(messageNormal));
else if (buttonStateBr == LOW)
byte messageBr[] = {0x3C, 0x49, 0x44, 0x30, 0x30, 0x3E, 0x3C, 0x52, 0x50, 0x44, 0x3E, 0x34, 0x32, 0x3C, 0x45, 0x3E};
Serial.write(messageBr, sizeof(messageBr));
else if (buttonStateLG == LOW)
byte messageLG[] = {0x3C, 0x49, 0x44, 0x30, 0x30, 0x3E, 0x3C, 0x52, 0x50, 0x44, 0x3E, 0x34, 0x33, 0x3C, 0x45, 0x3E};
Serial.write(messageLG, sizeof(messageLG));
else if (buttonStateHG == LOW)
byte messageHG[] = {0x3C, 0x49, 0x44, 0x30, 0x30, 0x3E, 0x3C, 0x52, 0x50, 0x44, 0x3E, 0x34, 0x34, 0x3C, 0x45, 0x3E};
Serial.write(messageHG, sizeof(messageHG));
else if (buttonStateEv == LOW)
byte messageEv[] = {0x3C, 0x49, 0x44, 0x30, 0x30, 0x3E, 0x3C, 0x52, 0x50, 0x44, 0x3E, 0x34, 0x35, 0x3C, 0x45, 0x3E};
Serial.write(messageEv, sizeof(messageEv));
}
ANY ideas on this?
Kind regards
Joern