Go Down

Topic: Arduino DUE print with Serial Enabled 20x4 LCD (Read 191 times) previous topic - next topic

dalebd

I have a Arduino DUE and I m trying to print on an Serial Enable 20x4 LCD from Sparkfun and its not working. Instead of printing correctly, the LCD will show some weird characters. Here is my code.

Thank you for your help

#include <SparkSoftLCD.h>

// LCD transmit pin
#define LCD_TX 2

// define lcd
SparkSoftLCD lcd = SparkSoftLCD(LCD_TX);


void setup() {

// setup lcd 
 pinMode(LCD_TX, OUTPUT);
 lcd.begin(9600);
 lcd.clear();
 
 // hidden cursor
 lcd.cursor(0);
 delay(500);
 
}


long tps_init;
long tps_fin;

void loop() {

   lcd.clear();   
   tps_init = 12345;
   tps_fin = 6789;
   lcd.cursorTo(1,1);
   lcd.print(tps_init);
   lcd.cursorTo(2,1);
   lcd.print(tps_fin);
   delay(10000);


}

MorganS

Is it the same characters every 10 seconds or different?
"The problem is in the code you didn't post."

Go Up