I have connected the display to and Arduino Mega to play with for now and have figured that some setting have gone a-stray internally,.. probably its i2c address,.. which is how I talk to the display..
Needless to say, I can set the display to manual mode and things seem to work OK…. My problem is How to I commit the new default setting to LK202 memory so that they are used at the next power up.
I can set the Data lock flag,.. but the actual step by step on what to do seems a little confusing to me,…. Ie how do I actually SAVE current settings,.. before setting data lock back off.
I found some simple code to talk to the display,... and I have been using the following to set the data-lock flag,.. I have tried several combinations of power off and on but nothing seems to stick,... clearly I am missing the obvious,.. can someone pls point in the right direction...
Code: Select all
#include <Wire.h>
// default MatrixOrbital lcd address (0x50) converted from 8bit to 7bit
#define LCD (0x28)
char c ;
void setup() {
Serial.begin(19200);
Wire.begin();
// Initialise display with clear command
Wire.beginTransmission(LCD);
Wire.write(254);
Wire.write(88);
Wire.endTransmission();
Wire.beginTransmission(LCD);
Wire.write("Hello World....");
Wire.endTransmission();
}
void loop() {
if (Serial.available() > 0) {
c = Serial.read();
if ( c == 0x52 ) { // R
Serial.write(c);
Wire.beginTransmission(LCD);
Wire.write(c);
Wire.endTransmission();
Wire.beginTransmission(LCD);
Wire.write(254);
Wire.write(202);
Wire.write(245);
Wire.write(160);
Wire.write(00);
Wire.endTransmission();
}
else if ( c == 0x54 ) { // T
Serial.write(c);
Wire.beginTransmission(LCD);
Wire.write(c);
Wire.endTransmission();
Wire.beginTransmission(LCD);
Wire.write(254);
Wire.write(202);
Wire.write(245);
Wire.write(160);
Wire.write(80);
Wire.endTransmission();
}
Serial.write(c);
Wire.beginTransmission(LCD);
Wire.write(c);
Wire.endTransmission();
}
}