發表文章

目前顯示的是有「arduno uno」標籤的文章

arduno uno GPS OLED 輸出

圖片
喵的咧 用U8g2來寫直接記憶體爆掉 完整程式碼如下 #include <SoftwareSerial.h> #include <TinyGPS++.h> //#include <Arduino.h> //#include <U8g2lib.h> #include <U8x8lib.h> //#ifdef U8X8_HAVE_HW_SPI #include <SPI.h> //#endif //#ifdef U8X8_HAVE_HW_I2C //#include <Wire.h> //#endif U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE);   // OLEDs without Reset of the Display //U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE);   // All Boards without Reset of the Display int RXPin = 2; int TXPin = 3; int GPSBaud = 9600; SoftwareSerial gpsSerial(RXPin, TXPin); TinyGPSPlus gps; // Create a TinyGPS++ object void setup(void) {   u8x8.begin();   u8x8.setPowerSave(0);   Serial.begin(9600);   gpsSerial.begin(GPSBaud); } void monShow(float La,float Lo,float Al){   //u8g2.clearBuffer();    ...