void loop() {
u8g2.clearBuffer();
u8g2.setFont(u8g_font_helvB10);
u8g2.drawStr(0, 20, " Happy New Year");
u8g2.setFont(u8g_font_helvB24);
u8g2.drawStr(0, 60, " 2018");
u8g2.sendBuffer();
digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level)
delay(3000);
u8g2.clearBuffer();
u8g2.setFont(u8g_font_helvB18);
u8g2.drawStr(0, 20, " 19-2-2018");
u8g2.setFont(u8g_font_helvB14);
u8g2.drawStr(0, 55, " Andy Cheng");
u8g2.sendBuffer();
digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW
delay(3000);
}
//******************************************************************************************************************
项目使用了 38140 字节,占用了 (58%) 程序存储空间。最大为 65536 字节。
全局变量使用了4352字节,(21%)的动态内存,余留16128字节局部变量。最大为20480字节。
C:Program FilesArduinohardwareSTM32/tools/win/maple_upload.bat COM12 2 1EAF:0003 C:UserspcAppDataLocalTemparduino_build_488645/esp32_sh1106.ino.bin
maple_loader v0.1
Resetting to bootloader via DTR pulse
Searching for DFU device [1EAF:0003]...
Found it!
Opening USB Device 0x1eaf:0x0003...
Found Runtime: [0x1eaf:0x0003] devnum=1, cfg=0, intf=0, alt=2, name="STM32duino bootloader v1.0 Upload to Flash 0x8002000"
Setting Configuration 1...
Claiming USB DFU Interface...
Setting Alternate Setting ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0400
bytes_per_hash=762
Starting download: [##################################################] finished!
error resetting after download: usb_reset: could not reset device, win error: 系统找不到指定的文件。
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode
#include <U8g2lib.h>
#include <Wire.h> //STM32f103c8t6选用硬件I2C模式,超简单。
// SCL PB6
// SDA PB7
#define LED PC13
U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE);
void setup() {
Wire.setClock(40000L); // Setting clock frequency
Wire.begin();
u8g2.begin();
pinMode(LED, OUTPUT);
}
void loop() {
u8g2.clearBuffer();
u8g2.setFont(u8g_font_helvB10);
u8g2.drawStr(0, 20, " Happy New Year");
u8g2.setFont(u8g_font_helvB24);
u8g2.drawStr(0, 60, " 2018");
u8g2.sendBuffer();
digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level)
delay(3000);
u8g2.clearBuffer();
u8g2.setFont(u8g_font_helvB18);
u8g2.drawStr(0, 20, " 19-2-2018");
u8g2.setFont(u8g_font_helvB14);
u8g2.drawStr(0, 55, " Andy Cheng");
u8g2.sendBuffer();
digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW
delay(3000);
}
//******************************************************************************************************************
项目使用了 38140 字节,占用了 (58%) 程序存储空间。最大为 65536 字节。
全局变量使用了4352字节,(21%)的动态内存,余留16128字节局部变量。最大为20480字节。
C:Program FilesArduinohardwareSTM32/tools/win/maple_upload.bat COM12 2 1EAF:0003 C:UserspcAppDataLocalTemparduino_build_488645/esp32_sh1106.ino.bin
maple_loader v0.1
Resetting to bootloader via DTR pulse
Searching for DFU device [1EAF:0003]...
Found it!
Opening USB Device 0x1eaf:0x0003...
Found Runtime: [0x1eaf:0x0003] devnum=1, cfg=0, intf=0, alt=2, name="STM32duino bootloader v1.0 Upload to Flash 0x8002000"
Setting Configuration 1...
Claiming USB DFU Interface...
Setting Alternate Setting ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0400
bytes_per_hash=762
Starting download: [##################################################] finished!
error resetting after download: usb_reset: could not reset device, win error: 系统找不到指定的文件。
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode
一周热门 更多>