I have tried many combination using sprintf to read from serial to my color LCD it print 1 2 3 4 5 6 7 in a sequence but not in a string like i want here is my code:
// Included files
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include "WProgram.h"
#include "HardwareSerial.h"
// External Component Libs
#include "LCD_driver.h"
void setup()
{
ioinit(); //Initialize I/O
LCDInit(); //Initialize the LCD
LCDContrast(45);
LCDClear(WHITE);
Serial.begin(9600);
Serial.println("Enter Password");
}
void loop()
{
if(Serial.available())
{
//int val1 = Serial.read();
char buffer[10];
sprintf (buffer, "%c", Serial.read());
LCDPutStr(buffer,1,5,BLACK,WHITE);
delay(150);
}
}
to better explain: if i type into the serial monitor 12345 it will iterate through the values 12345 and only display 5 how do I make it display 12345 on the color LCD screen.\
Thanks for the help:)