Arduino Forum

Forum 2005-2010 (read only) => Software => Troubleshooting => Topic started by: FPGA on Apr 20, 2010, 11:13 am

Title: NHD[ch8208]0220D3Z[ch8208]NSW[ch8208]BBW - BAcklight ON/OFF
Post by: FPGA on Apr 20, 2010, 11:13 am
Anyone has an example on howto put this backlight on writing something to it and then putting the backlight off??

my code works except the part where there must be text written to the LCD. This text is not correct.

Example:

Code: [Select]
#include <SoftwareSerial.h>

#define LCDrxPin 2
#define LCDtxPin 8

SoftwareSerial LCDSerial = SoftwareSerial(LCDrxPin,LCDtxPin);

void setup()
{
 pinMode(LCDrxPin,INPUT);
 pinMode(LCDtxPin,OUTPUT);
 LCDSerial.begin(9600);
 Serial.begin(9600);
 

}

void loop()
{
 
 delay(3000);
LCDSerial.print(254,BYTE); // Put LCD off by Backlight brightness
 LCDSerial.print(83,BYTE);
 LCDSerial.print(0,BYTE);
 delay(3000);
 
 delay(3000);
 LCDSerial.print(254,BYTE); // Put LCD on by Backlight brightness
 LCDSerial.print(83,BYTE);
 LCDSerial.print(8,BYTE);
 delay(3000);
  LCDSerial.print(254,BYTE); // Cursor Home Command
 LCDSerial.print(70,BYTE);

 delay(3000);
 LCDSerial.print("Test");
  LCDSerial.print(254,BYTE); // Clear Screen Command
 LCDSerial.print(81,BYTE);
 
 delay(3000);
}


Very much thank you