你的浏览器版本过低,可能导致网站不能正常访问!为了你能正常使用网站功能,请使用这些浏览器。
查看全部评分
xmstudio 发表于 2018-3-13 23:58 我有一个写好的OLED程序,楼主可以参考一下。这个程序的功能是ADC采样,并且利用ADC噪声产生一个随机数显示 ...
评分
查看全部评分
里面有一些我自己写的函数你应该可以直接拿去用
HAL_I2C_Master_Transmit(&hi2c1, 0x78, OledInitCodes, sizeof(OledInitCodes), 10);是OLED初始化,初始化的代码存在了OledInitCodes这个数组里,0x80代表发送的是指令。
OLED_Clear(void);是清屏
OLED_Print(char *c, uint8_t line);是显示任意ascii字符,这个程序写的是按行显示的,第一个参数是字符指针,可以直接用双引号那种字符串,也可以把要显示的字符先用sprintf写进变量再调用,这两种用法我这个程序都用到了。line是要显示字符的行,一般是从0到6,每行显示16个字符,每行字符占用OLED的两行PAGE
评分
查看全部评分
感谢指点,我研究下这个办法,谢谢
评分
查看全部评分