Hey,
First off I wanted to thank you for posting your code. I have been banging away at updating that old demo code and didn't realise the difference between print and write.
I am not sure if this helps but I was using this code to debug what to send to the TextStar. When I run it and press a button i get Aa Bb Cc Dd for each button respectively.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup (){
// print to laptop
Serial.begin(9600);
Serial.println("Arduino & TextStar LCD example");
mySerial.begin(9600);
mySerial.println("Hello, world?");
}
void loop (){
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}
The data sheet says:
Defining Keys
When they are pressed and released, each of the four keys on the module can send bytes of
data/ASCII characters via the Transmit (Tx) port to an attached device. For example, in the
module’s default state, when pressed the top left-hand key sends the ASCII letter 'A'. When it is
released, it sends the letter 'a'. In the same way, the bottom left-hand, top right-hand and bottom
right-hand keys will send 'Bb', 'Cc' and 'Dd' respectively. This can be tested by connecting the Tx
line to the Rx line on the module which will then display any characters that are sent.
The characters sent by each key can be redefined from the setup menu to any value between 0 and
255 or can be set to ‘None’ in which case no value will be assigned to that action. The assigned
values are also used by the ‘Send Key States’ command (254,'K') which uses them to transmit the
current key states to an attached device. This allows an attached device to determine which keys
are being pressed if required. The default assignment is 'AaBbCcDd' so if none of the keys are
being pressed, the command 254,'K' will result in a reply of 'abcd'. If the top left-hand key is being
pressed then 254,'K' will result in a reply of 'Abcd'.