Code for autonomous ground vehicle, Data Bus, 3rd place winner in 2012 Sparkfun AVC.
Dependencies: Watchdog mbed Schedule SimpleFilter LSM303DLM PinDetect DebounceIn Servo
lcd.c
00001 #include "mbed.h" 00002 /* 00003 void lcdInit() 00004 { 00005 lcd.baud(4800); 00006 lcd.printf("4800"); 00007 lcd.printf("%c%c", 0x7C, 13); 00008 lcd.baud(9600); 00009 lcd.printf("9600"); 00010 } 00011 00012 void lcdClear() 00013 { 00014 lcd.printf("%c%c",0xFE,0x01); // command, clear 00015 wait(0.020); 00016 } 00017 00018 void lcdSetPos(int x, int y) 00019 { 00020 uint8_t pos=0; 00021 00022 if ( x >= 0 && x < 16 && y >= 0 && y < 2) 00023 pos = x + y*64; 00024 00025 pos |= (1<<7); 00026 00027 lcd.printf("%c%c",0xFE,pos); 00028 } 00029 00030 void lcdSetSplash(const char *s1, const char *s2) 00031 { 00032 lcdClear(); 00033 lcd.printf(s1); 00034 lcdSetPos(0,1); 00035 lcd.printf(s2); 00036 lcd.printf("%c%c",0x7C,0x0A); 00037 } 00038 */
Generated on Tue Jul 12 2022 14:09:25 by 1.7.2