Adaptive Alpha Sign text message

Hello, I am trying to send a serial command to an Adaptive Alpha LED sign, and I am really confused. Seems like it should be easy, but everything I have tried has failed.

I am trying to follow these instructions.

So I believe I should be sending the following.

Serial.println ("00H 00H 00H 00H 00H 01H "Z00" 02H "AAHELLO" 04H");

This is not working and I just don't know why.

Hope someone can help. Thanks.

That tells nothing to helpers. Please explain in better words.
Post the code using Autoformat in the IDE and code tags, "</>", when pasting.

Hi @Seoulhawk

When using Serial.println(), you are sending bytes 0X0A and 0X0D at the end of your message.

Try using Serial.print().

Is the speed defined in your code equal to the speed of your Adaptive Alpha LED sign? Serial.begin(????).

RV mineirin

Is not working = nothing happens. :slight_smile: I am just asking if I am misunderstanding the document. Would you read those instructions and come to the same conclusion. I am confident that the serial port and baud rate are correct. I have tried to send the command above directly using putty, and nothing.

Your existing message is sending the ASCII characters for all those bytes. You need to send the binary bytes.

Serial.println ("00H 00H 00H 00H 00H 01H "Z00" 02H "AAHELLO" 04H");

Serial print(0x00… and so on…. “AAHello”);

Hi,
How have you got the display connected to the controller, can you please post a circuit diagram?

What model Arduino are you using?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

So, that would end up like this?

00110000 00110000 01001000 00100000 00110000 00110000 01001000 00100000 00110000 00110000 01001000 00100000 00110000 00110000 01001000 00100000 00110000 00110000 01001000 00100000 00110000 00110001 01001000 00100000 00100010 01011010 00110000 00110000 00100010 00100000 00110000 00110010 01001000 00100000 00100010 01000001 01000001 01001000 01000101 01001100 01001100 01001111 00100010 00100000 00110000 00110100 01001000

Or am I still missing something... Sorry I have never done anything in binary before.

That's not how you put hex characters into a text string. What you want is:
"\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04"

But you can't have a "\x00" (NUL) character in a string or String because that signals the end of the string. To send those binary bytes:
Serial.write("\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04", 18);
Since it can't rely on the NUL terminator to find the end of the string you have to tell it how many characters to send.

A more versatile version is:

  Serial.write("\x00\x00\x00\x00\x00\x01Z00\x02AA", 12);
  Serial.print("HELLO");
  Serial.write("\x04"); // or  Serial.write('\x04'); since it's 1 character.

Tom, I am using a Mega using a small ttl serial converter. I have used this with other systems and know that it works. I am really using Serial2 and 3 because I will be using two signs.

John, I will give that a shot and see what happens.

So here is my complete code... Please understand that I am a novice... :slight_smile:

 
const int button1 = 2; // N1 VTC
const int button2 = 3; // N6 VTC
const int button3 = 4; // N2 VTC
const int button4 = 5; // System Off
const int button5 = 6; // N1 PC
const int button6 = 7; // N6 PC
const int button7 = 8; // N2 PC

int lastState1, lastState2, lastState3, lastState4, lastState5, lastState6, lastState7;

int ledPin2 = 9; //N1 Green LED
int ledPin3 = 10; //N6 Blue LED
int ledPin4 = 11; //N2 Red LED
int ledPin5 = 12; //System Off White LED
int ledPin6 = 13; //PC N1 Green LED
int ledPin7 = 14; //PC N6 Blue LED
int ledPin8 = 16; //PC N2 Red LED

void setup() {
  // put your setup code here, to run once:

  pinMode(button1, INPUT_PULLUP); // N1 VTC
  pinMode(button2, INPUT_PULLUP); // N6 VTC
  pinMode(button3, INPUT_PULLUP); // N2 VTC
  pinMode(button4, INPUT_PULLUP); // System Off
  pinMode(button5, INPUT_PULLUP); // N1 PC
  pinMode(button6, INPUT_PULLUP); // N6 PC
  pinMode(button7, INPUT_PULLUP); // N2 PC
 
  pinMode(ledPin2, OUTPUT); //LED on /off N1
  pinMode(ledPin3, OUTPUT); //LED on /off N2
  pinMode(ledPin4, OUTPUT); //LED on /off N6

// initialize serial communication:
  Serial.begin(9600); //Connection to Display #1
  Serial.println( "Ready" );
  Serial1.begin(9600); //Connection to Display #2
  Serial1.println( "Ready" );
  Serial2.begin(9600); //Sign #1
  Serial2.println( "Ready" );
  Serial3.begin(9600); //Sign #2
  Serial3.println( "Ready" );
  
// initialize the Relay pin as an output:
  
  pinMode(20,OUTPUT); // CODEC N1
  pinMode(21,OUTPUT); // CODEC N1 Media Converter
  pinMode(22,OUTPUT); // LED N1 Button
  pinMode(23,OUTPUT); // LED Sign N1 #1
  pinMode(24,OUTPUT); // LED Sign N1 #2
  pinMode(25,OUTPUT); // CODEC N6
  pinMode(26,OUTPUT); // CODEC N6 Media Converter
  pinMode(27,OUTPUT); // LED N6 Button
  pinMode(28,OUTPUT); // LED Sign N6 #1
  pinMode(29,OUTPUT); // LED Sign N6 #2
  pinMode(30,OUTPUT); // CODEC N2
  pinMode(31,OUTPUT); // CODEC N2 Media Converter
  pinMode(32,OUTPUT); // LED N2 Button
  pinMode(33,OUTPUT); // LED Sign N2 #1
  pinMode(34,OUTPUT); // LED Sign N2 #2
  pinMode(35,OUTPUT); // NC
  pinMode(36,OUTPUT); // LED N1 PC Button
  pinMode(37,OUTPUT); // LED N6 PC Button
  pinMode(38,OUTPUT); // LED N2 PC Button
  pinMode(39,OUTPUT); // LED Off Button
  pinMode(40,OUTPUT); // Touch 10
  pinMode(41,OUTPUT); // White Noise
  pinMode(42,OUTPUT); // PC USB Bridge
      
//  Relay setup
  
  digitalWrite(20, HIGH); // CODEC N1
  digitalWrite(21, HIGH); // CODEC N1 Media Converter
  digitalWrite(22, HIGH); // LED N1 Button
  digitalWrite(23, HIGH); // LED Sign N1 #1
  digitalWrite(24, HIGH); // LED Sign N1 #2
  digitalWrite(25, HIGH); // CODEC N6
  digitalWrite(26, HIGH); // CODEC N6 Media Converter
  digitalWrite(27, HIGH); // LED N6 Button
  digitalWrite(28, HIGH); // LED Sign N6 #1
  digitalWrite(29, HIGH); // LED Sign N6 #2
  digitalWrite(30, HIGH); // CODEC N2
  digitalWrite(31, HIGH); // CODEC N2 Media Converter
  digitalWrite(32, HIGH); // LED N2 Button
  digitalWrite(33, HIGH); // LED Sign N2 #1
  digitalWrite(34, HIGH); // LED Sign N2 #2
  digitalWrite(35, HIGH); // NC
  digitalWrite(36, HIGH); // LED N1 PC Button
  digitalWrite(37, HIGH); // LED N6 PC Button
  digitalWrite(38, HIGH); // LED N2 PC Button
  digitalWrite(39, LOW); // LED Off Button
  digitalWrite(40, HIGH); // Touch 10
  digitalWrite(41, HIGH); // White Noise
  digitalWrite(42, HIGH); // PC USB Bridge
}
void loop() {
// put your main code here, to run repeatedly:
 
// Button 1 Green VTC N1
  
  int state = digitalRead(button1);
  if (state != lastState1 ) {
    if ( state == LOW ) {      
      
// Relay State VTC N1:
        
      Serial.println ("ka 00 01");
      Serial1.println ("ka 00 01");
      Serial2.println ("\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04");
      Serial3.println ("\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04");
      digitalWrite(20, LOW); // CODEC N1
      digitalWrite(21, LOW); // CODEC N1 Media Converter
      digitalWrite(22, LOW); // LED N1 Button
      digitalWrite(23, LOW); // LED Sign N1 #1
      digitalWrite(24, LOW); // LED Sign N1 #2
      digitalWrite(25, HIGH); // CODEC N6
      digitalWrite(26, HIGH); // CODEC N6 Media Converter
      digitalWrite(27, HIGH); // LED N6 Button
      digitalWrite(28, HIGH); // LED Sign N6 #1
      digitalWrite(29, HIGH); // LED Sign N6 #2
      digitalWrite(30, HIGH); // CODEC N2
      digitalWrite(31, HIGH); // CODEC N2 Media Converter
      digitalWrite(32, HIGH); // LED N2 Button
      digitalWrite(33, HIGH); // LED Sign N2 #1
      digitalWrite(34, HIGH); // LED Sign N2 #2
      digitalWrite(35, HIGH); // NC
      digitalWrite(36, HIGH); // LED N1 PC Button
      digitalWrite(37, HIGH); // LED N6 PC Button
      digitalWrite(38, HIGH); // LED N2 PC Button
      digitalWrite(39, HIGH); // LED Off Button
      digitalWrite(40, HIGH); // Touch 10
      digitalWrite(41, LOW); // White Noise
      digitalWrite(42, HIGH); // PC USB Bridge
      delay (1000);
      digitalWrite(40, LOW);  // Touch 10
      delay (1000);
    }
    lastState1 = state;
    delay(20);
  }
// Button 2 Blue VTC N6
  state = digitalRead(button2); //Configure N6 and trigger relay
  if (state != lastState2 ) {
    if ( state == LOW ) {
  
// Relay State VTC N6:
        
      Serial.println ("ka 00 01");
      Serial1.println ("ka 00 01");
      Serial2.println ("\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04");
      Serial3.println ("\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04");
      digitalWrite(20, HIGH); // CODEC N1
      digitalWrite(21, HIGH); // CODEC N1 Media Converter
      digitalWrite(22, HIGH); // LED N1 Button
      digitalWrite(23, HIGH); // LED Sign N1 #1
      digitalWrite(24, HIGH); // LED Sign N1 #2
      digitalWrite(25, LOW); // CODEC N6
      digitalWrite(26, LOW); // CODEC N6 Media Converter
      digitalWrite(27, LOW); // LED N6 Button
      digitalWrite(28, LOW); // LED Sign N6 #1
      digitalWrite(29, LOW); // LED Sign N6 #2
      digitalWrite(30, HIGH); // CODEC N2
      digitalWrite(31, HIGH); // CODEC N2 Media Converter
      digitalWrite(32, HIGH); // LED N2 Button
      digitalWrite(33, HIGH); // LED Sign N2 #1
      digitalWrite(34, HIGH); // LED Sign N2 #2
      digitalWrite(35, HIGH); // NC
      digitalWrite(36, HIGH); // LED N1 PC Button
      digitalWrite(37, HIGH); // LED N6 PC Button
      digitalWrite(38, HIGH); // LED N2 PC Button
      digitalWrite(39, HIGH); // LED Off Button
      digitalWrite(40, HIGH); // Touch 10
      digitalWrite(41, LOW); // White Noise
      digitalWrite(42, HIGH); // PC USB Bridge
      delay (1000);
      digitalWrite(40, LOW);  // Touch 10
      delay (1000);
      
    
    }
    lastState2 = state;
    delay(20);
  }
// Button 3 Red VTC N2
  state = digitalRead(button3);
  if (state != lastState3 ) {
    if ( state == LOW ) {
  
   // Relay State N2:
        
      Serial.println ("ka 00 01");
      Serial1.println ("ka 00 01");
      Serial2.println ("\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04");
      Serial3.println ("\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04");
      digitalWrite(20, HIGH); // CODEC N1
      digitalWrite(21, HIGH); // CODEC N1 Media Converter
      digitalWrite(22, HIGH); // LED N1 Button
      digitalWrite(23, HIGH); // LED Sign N1 #1
      digitalWrite(24, HIGH); // LED Sign N1 #2
      digitalWrite(25, HIGH); // CODEC N6
      digitalWrite(26, HIGH); // CODEC N6 Media Converter
      digitalWrite(27, HIGH); // LED N6 Button
      digitalWrite(28, HIGH); // LED Sign N6 #1
      digitalWrite(29, HIGH); // LED Sign N6 #2
      digitalWrite(30, LOW); // CODEC N2
      digitalWrite(31, LOW); // CODEC N2 Media Converter
      digitalWrite(32, LOW); // LED N2 Button
      digitalWrite(33, LOW); // LED Sign N2 #1
      digitalWrite(34, LOW); // LED Sign N2 #2
      digitalWrite(35, HIGH); // NC
      digitalWrite(36, HIGH); // LED N1 PC Button
      digitalWrite(37, HIGH); // LED N6 PC Button
      digitalWrite(38, HIGH); // LED N2 PC Button
      digitalWrite(39, HIGH); // LED Off Button
      digitalWrite(40, HIGH); // Touch 10
      digitalWrite(41, LOW); // White Noise
      digitalWrite(42, HIGH); // PC USB Bridge
      delay (1000);
      digitalWrite(40, LOW);  // Touch 10
      delay (1000); 
    }
    lastState3 = state;
    delay(20);
  }
//Button 4 System Off
  state = digitalRead(button4);
  if (state != lastState4 ) {
    if ( state == LOW ) {

    // Relay State System Off:
      
      Serial.println ("ka 00 00");
      Serial1.println ("ka 00 00");
      Serial2.println ("\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04");
      Serial3.println ("\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04");
      digitalWrite(20, HIGH); // CODEC N1
      digitalWrite(21, HIGH); // CODEC N1 Media Converter
      digitalWrite(22, HIGH); // LED N1 Button
      digitalWrite(23, HIGH); // LED Sign N1 #1
      digitalWrite(24, HIGH); // LED Sign N1 #2
      digitalWrite(25, HIGH); // CODEC N6
      digitalWrite(26, HIGH); // CODEC N6 Media Converter
      digitalWrite(27, HIGH); // LED N6 Button
      digitalWrite(28, HIGH); // LED Sign N6 #1
      digitalWrite(29, HIGH); // LED Sign N6 #2
      digitalWrite(30, HIGH); // CODEC N2
      digitalWrite(31, HIGH); // CODEC N2 Media Converter
      digitalWrite(32, HIGH); // LED N2 Button
      digitalWrite(33, HIGH); // LED Sign N2 #1
      digitalWrite(34, HIGH); // LED Sign N2 #2
      digitalWrite(35, HIGH); // NC
      digitalWrite(36, HIGH); // LED N1 PC Button
      digitalWrite(37, HIGH); // LED N6 PC Button
      digitalWrite(38, HIGH); // LED N2 PC Button
      digitalWrite(39, LOW); // LED Off Button
      digitalWrite(40, HIGH); // Touch 10
      digitalWrite(41, HIGH); // White Noise
      digitalWrite(42, HIGH); // PC USB Bridge 
    }
    lastState4 = state;
    delay(20);
  }
  //Button 5 Green PC N1
  state = digitalRead(button5);
  if (state != lastState5 ) {
    if ( state == LOW ) {

    // Relay State Green PC N1:

      Serial.println ("ka 00 01");
      Serial1.println ("ka 00 01");
      Serial2.println ("\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04");
      Serial3.println ("\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04");
      digitalWrite(20, HIGH); // CODEC N1
      digitalWrite(21, HIGH); // CODEC N1 Media Converter
      digitalWrite(22, HIGH); // LED N1 Button
      digitalWrite(23, LOW); // LED Sign N1 #1
      digitalWrite(24, LOW); // LED Sign N1 #2
      digitalWrite(25, HIGH); // CODEC N6
      digitalWrite(26, HIGH); // CODEC N6 Media Converter
      digitalWrite(27, HIGH); // LED N6 Button
      digitalWrite(28, HIGH); // LED Sign N6 #1
      digitalWrite(29, HIGH); // LED Sign N6 #2
      digitalWrite(30, HIGH); // CODEC N2
      digitalWrite(31, HIGH); // CODEC N2 Media Converter
      digitalWrite(32, HIGH); // LED N2 Button
      digitalWrite(33, HIGH); // LED Sign N2 #1
      digitalWrite(34, HIGH); // LED Sign N2 #2
      digitalWrite(35, HIGH); // NC
      digitalWrite(36, LOW); // LED N1 PC Button
      digitalWrite(37, HIGH); // LED N6 PC Button
      digitalWrite(38, HIGH); // LED N2 PC Button
      digitalWrite(39, HIGH); // LED Off Button
      digitalWrite(40, HIGH); // Touch 10
      digitalWrite(41, LOW); // White Noise
      digitalWrite(42, LOW); // PC USB Bridge 
    }
    lastState5 = state;
    delay(20);
    }
     //Button 6 Blue PC N6:
  state = digitalRead(button6);
  if (state != lastState6 ) {
    if ( state == LOW ) {

    // Relay State PC N6:
      
      Serial.println ("ka 00 01");
      Serial1.println ("ka 00 01");
      Serial2.println ("\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04");
      Serial3.println ("\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04");
      digitalWrite(20, HIGH); // CODEC N1
      digitalWrite(21, HIGH); // CODEC N1 Media Converter
      digitalWrite(22, HIGH); // LED N1 Button
      digitalWrite(23, HIGH); // LED Sign N1 #1
      digitalWrite(24, HIGH); // LED Sign N1 #2
      digitalWrite(25, HIGH); // CODEC N6
      digitalWrite(26, HIGH); // CODEC N6 Media Converter
      digitalWrite(27, HIGH); // LED N6 Button
      digitalWrite(28, LOW); // LED Sign N6 #1
      digitalWrite(29, LOW); // LED Sign N6 #2
      digitalWrite(30, HIGH); // CODEC N2
      digitalWrite(31, HIGH); // CODEC N2 Media Converter
      digitalWrite(32, HIGH); // LED N2 Button
      digitalWrite(33, HIGH); // LED Sign N2 #1
      digitalWrite(34, HIGH); // LED Sign N2 #2
      digitalWrite(35, HIGH); // NC
      digitalWrite(36, HIGH); // LED N1 PC Button
      digitalWrite(37, LOW); // LED N6 PC Button
      digitalWrite(38, HIGH); // LED N2 PC Button
      digitalWrite(39, HIGH); // LED Off Button
      digitalWrite(40, HIGH); // Touch 10
      digitalWrite(41, LOW); // White Noise
      digitalWrite(42, LOW); // PC USB Bridge 
    }
    lastState6 = state;
    delay(20);
    }
    //Button 7 Red PC N2:
  state = digitalRead(button6);
  if (state != lastState7 ) {
    if ( state == LOW ) {

    // Relay State PC N2:
      
      Serial.println ("ka 00 01");
      Serial1.println ("ka 00 01");
     Serial2.println ("\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04");
      Serial3.println ("\x00\x00\x00\x00\x00\x01Z00\x02AAHELLO\x04");
      digitalWrite(20, HIGH); // CODEC N1
      digitalWrite(21, HIGH); // CODEC N1 Media Converter
      digitalWrite(22, HIGH); // LED N1 Button
      digitalWrite(23, HIGH); // LED Sign N1 #1
      digitalWrite(24, HIGH); // LED Sign N1 #2
      digitalWrite(25, HIGH); // CODEC N6
      digitalWrite(26, HIGH); // CODEC N6 Media Converter
      digitalWrite(27, HIGH); // LED N6 Button
      digitalWrite(28, HIGH); // LED Sign N6 #1
      digitalWrite(29, HIGH); // LED Sign N6 #2
      digitalWrite(30, HIGH); // CODEC N2
      digitalWrite(31, HIGH); // CODEC N2 Media Converter
      digitalWrite(32, HIGH); // LED N2 Button
      digitalWrite(33, LOW); // LED Sign N2 #1
      digitalWrite(34, LOW); // LED Sign N2 #2
      digitalWrite(35, HIGH); // NC
      digitalWrite(36, HIGH); // LED N1 PC Button
      digitalWrite(37, HIGH); // LED N6 PC Button
      digitalWrite(38, LOW); // LED N2 PC Button
      digitalWrite(39, HIGH); // LED Off Button
      digitalWrite(40, HIGH); // Touch 10
      digitalWrite(41, LOW); // White Noise
      digitalWrite(42, LOW); // PC USB Bridge 
    }
    lastState7 = state;
    delay(20);
    }
}

Still no joy. When I connect putty to the serial port to see what comes back I see a carriage return but that is about it

Hi,
Can you please post a link to data/spec of the display?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

http://support.adaptivedisplays.com/Documentation/questions.php?questionid=149

Hi,
What model?
The link took me to a list of diplays.

Can you post the pdf you used in post #1.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

[Alpha Sign Communication Protocol (PN 97088061) - REV G.pdf]
This is the document. The Model is the 4120C120.

I need to run for a while. Thank you guys for your help. Thiis s just kicking my butt.

Do you understand the difference between the Serial.print() function and the Serial.write() function?

I suggest that you reread johnwasser's reply #8.

No, not really, I was trying to look that up to understand.

John,

I tried this on Serial2. The good news is when connecting to the Arduino with putty I see Z00▒HELLO, bad news is the sign still does nothing. I don't see any of the first write information on putty... Should I?

Serial2.write("\x00\x00\x00\x00\x00\x01Z00\x02AA", 12);
      Serial2.print("HELLO");
      Serial2.write("\x04");

The first line needs to be Hex then the second ASCII then back to Hex.

So you see the "Z00" part but don't see the "Z00" part?!? I think you are confused. The hex characters 00, 01, 02 , and 04 are not printable so it is natural that you would not see them. Putty may have a mode where it shows 'control characters' in some form.

If the sign is not reacting as you expect, perhaps the baud rate is wrong or there are other steps required before it will accept commands.