当前位置:网站首页>Development of esp-01s in Arduino (1)
Development of esp-01s in Arduino (1)
2022-04-22 09:32:00 【Fingertip magician】
parts :esp-01s, ssd1306
development tool :arduino
The deployment environment : Please refer to online materials .
One 、 install arduino:
To https://www.arduino.cc/en/software download arduino
esp-01s The driver can be installed according to the actual situation . I didn't install , Use WINDOWS Self installed CH340 drive .
Two : install 8266 library :
open arduino after , stay file =》 Preferences Add additional board data as shown below :
http://arduino.esp8266.com/stable/package_esp8266com_index.json

3、 ... and : Click on Tools =》 Development board =》 Development management board , Screening 8266, Installation


If : Installation error , You can also use the following methods :
Development documents of lighting technology :
https://www.diandeng.tech/doc/getting-start-8266

Four :arduino Choose development board , Refer to the following for parameters

5、 ... and : Use ssd1306, Download library , I installed this .

6、 ... and : The equipment wiring is shown in the figure

7、 ... and : The code is as follows :
You can test esp-01s, Whether it can operate normally : use blink Program
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
digitalWrite(LED_BUILTIN, HIGH);
delay(2000);
}
No problem , Connect ssd1306
#include <Wire.h>
#include "SSD1306Wire.h"
const int I2C_DISPLAY_ADDRESS=0x3c;
#if defined(ESP8266)
const int SDA_PIN = 0;
const int SCL_PIN = 2;
#endif
SSD1306Wire display(I2C_DISPLAY_ADDRESS, SDA_PIN, SCL_PIN);
void setup(){
display.init();
display.flipScreenVertically();// Flip
}
void loop(){
display.clear(); // Clear the screen
display.setFont(ArialMT_Plain_24);
display.setTextAlignment(TEXT_ALIGN_LEFT);
display.drawString(10, 18, "wait");
display.display();
}
版权声明
本文为[Fingertip magician]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220916156078.html
边栏推荐
猜你喜欢
随机推荐
L3-002 special stack (30 points) (two points stack)
Manually build hyperledger fabric v2 X production network (IV) create channel and chain code life cycle
浅析MOS管开关速度影响因素-KIA MOS管
L3-005 dustbin distribution (30 points) (dijkstar)
Text justify, orientation, combine text attributes
jdbc连不上mysql 报错为 Access denied for user 'root'@'***' (using password: YES)
vector常见接口的用法
mySQL基础记录
在销量压力下,国产手机开始降价了,但还没有放下最后的面子
Kernel pwn 基础教程之 Heap Overflow
Beyond iterm! Known as the next generation terminal artifact, powerful!
push()与pop()的使用
Detailed explanation of p-type mos tube switch circuit and working principle - Kia MOS tube
超越iTerm! 号称下一代终端神器,功能贼强大!
QT布局管理复习
安装Navicat 15 详解及相关问题详解
GS waveform analysis of depth resolved MOS transistor Kia MOS transistor
Website domain name application
基于MOSFET控制的大范围连续可调(0~45V) 的小功率稳压电源设计实例
Heap overflow of kernel PWN basic tutorial









