Arduino Forum

Products => Arduino Due => Topic started by: dalebd on Mar 14, 2017, 02:40 am

Title: Arduino DUE print with Serial Enabled 20x4 LCD
Post by: dalebd on Mar 14, 2017, 02:40 am
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);


}
Title: Re: Arduino DUE print with Serial Enabled 20x4 LCD
Post by: MorganS on Mar 17, 2017, 07:13 am
Is it the same characters every 10 seconds or different?