mirror of
https://github.com/caperren/school_archives.git
synced 2025-11-09 13:41:13 +00:00
These are all design documents that I thought I had lost. It's may make me cringe, but it's still cool to use it to see how far I've come.
57 lines
1.3 KiB
C++
57 lines
1.3 KiB
C++
void LcdMoveToTop(){
|
|
LcdSerial.write(254); //Put LCD into move mode
|
|
LcdSerial.write(128); //Move to the first character of the first row
|
|
}
|
|
|
|
void LcdMoveToBottom(){
|
|
LcdSerial.write(254); //Put LCD into move mode
|
|
LcdSerial.write(192); //Move to the first character of the second row
|
|
}
|
|
|
|
void FullLcdClear(){
|
|
LcdSerial.write(254); //Send special command character
|
|
LcdSerial.write(1); //Send Clear Screen Command
|
|
}
|
|
|
|
void TopLcdClear(){
|
|
LcdMoveToTop();
|
|
LcdSerial.write(" "); //Write a blank 16 character string
|
|
}
|
|
|
|
void BottomLcdClear(){
|
|
LcdMoveToBottom();
|
|
LcdSerial.write(" "); //Write a blank 16 character string
|
|
}
|
|
|
|
void FullLcdWrite(const char* TopLcd, const char* BottomLcd){
|
|
TopLcdWrite(TopLcd);
|
|
BottomLcdWrite(BottomLcd);
|
|
}
|
|
|
|
void TopLcdWrite(const char *TopLcd){
|
|
/*
|
|
unsigned char string[16];
|
|
Serial.write("Size of string: ");
|
|
Serial.write(sizeof(TopLcd));
|
|
delay(5000);
|
|
for(int i = 0 ; i < sizeof(TopLcd) ; i++){
|
|
string[i] = TopLcd[i];
|
|
}
|
|
|
|
if(sizeof(TopLcd) < 16){
|
|
for(int i = sizeof(TopLcd) ; i < 16 ; i++){
|
|
string[i] = 32;
|
|
}
|
|
}
|
|
*/
|
|
LcdMoveToTop();
|
|
LcdSerial.write(TopLcd); //Write string
|
|
|
|
}
|
|
|
|
void BottomLcdWrite(const char *BottomLcd){
|
|
LcdMoveToBottom();
|
|
LcdSerial.write(BottomLcd); //Write string
|
|
}
|
|
|