福建省住房建设厅网站6word怎么做网站导航栏
名:1.5寸**进口 128128带灰阶oled屏
协:spi串口
铺:老王电子diy
设备: OLED
时间:2024/11/15
IDE: arduino

 
 
兜兜转转还是打通了,他的接口 用的i2c 标志 夭寿咯
- MOSI(Master Out Slave In):主机输出,从机输入。
 - MISO(Master In Slave Out):主机输入,从机输出。
 - SCLK(Serial Clock):串行时钟信号,由主机产生。
 - CS(Chip Select):片选信号,用于选择特定的从机。
 
data 对应 SDA clock 对应 SCK CS DC RST
SW代表软件驱动
#include <U8g2lib.h>
#include <SPI.h>
U8G2_SSD1327_ZJY_128X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 10, /* data=*/ 3, /* cs=*/ 7, /* dc=*/ 2, /* reset=*/ 8);void setup() {// put your setup code here, to run once:Serial.begin(115200);Serial.println("0888");u8g2.begin();}void loop() {  u8g2.clearBuffer();					// clear the internal memoryu8g2.setFont(u8g2_font_ncenB08_tr);	// choose a suitable fontu8g2.drawStr(0,10,"Hello World!");	// write something to the internal memoryu8g2.sendBuffer();					// transfer internal memory to the displaydelay(1000);  
}
 
