国内综合精彩aⅤ无码不卡_日本少妇做爰全过程_欧美性爱在线播放免费_午夜?V日韩一区二区_免费a级毛片无码免费播放_成在人线av无码喷水_亚洲精品网站色视频_国产婷婷精品成人_老师撩起裙子让我桶的视频_秋霞影院国产

Arduino IDE for ESP8266操作IO對應(yīng)關(guān)系。

作者:lmdf | 更新時間:2016-10-19 | 瀏覽量:3293

簡單一句話,在Arduino IDE for ESP8266里面用arduino 代碼寫ESP8266程序,對GPIO16的輸出digitalWrite(16, LOW)就OK,前幾天看到有人發(fā)的那個刷了nodemcu固件后的管腳對照表,害死人啊,我的ESP8266是刷了nodemcu固件,但是根本不能按照那個對照表操作,折騰了好幾天才明白,唉!

另外發(fā)現(xiàn)三點:

1、GPIO6~GPIO11不要使用,否則引起存儲錯誤,不停重啟;

2、GPIO16只能做為輸出,不能輸入,否則也會引起錯誤

3、ESP的輸入會保持,當(dāng)某管腳連接一個開關(guān)到低電平,按下開關(guān),ESP會輸入0,當(dāng)松起開關(guān)時,這個0會一直保持,直到輸入高電平才會變1,然后繼續(xù)保持。

也許因為新手,不知道是不是別人早就知道呢?


評論:共5條

貝殼物聯(lián) 評論于:2016-10-19 22:41:12
以上說的是真的如此嗎?還沒遇到過,還請大神測試。
lmdf 評論于:2016-10-20 09:23:32
真的,實測結(jié)果!
貝殼物聯(lián) 回復(fù)于:2016-10-20 09:55:07
回復(fù) @lmdf:你的esp8266還有開關(guān),是用esp8266做的開發(fā)板吧?
lmdf 回復(fù)于:2016-10-20 10:55:57
回復(fù) @貝殼物聯(lián): 我是裸板,焊接幾根線,插在面包板上
lmdf 評論于:2016-10-20 11:10:27
Digital IO
http://esp8266.github.io/Arduino/versions/2.3.0/doc/reference.html
Pin numbers in Arduino correspond directly to the ESP8266 GPIO pin numbers.pinMode,?digitalRead, and?digitalWrite?functions work as usual, so to read GPIO2, call?digitalRead(2).
Digital pins 0—15 can be?INPUT,?OUTPUT, or?INPUT_PULLUP. Pin 16 can beINPUT,?OUTPUT?or?INPUT_PULLDOWN_16. At startup, pins are configured asINPUT.
Pins may also serve other functions, like Serial, I2C, SPI. These functions are normally activated by the corresponding library. The diagram below shows pin mapping for the popular ESP-12 module.

Digital pins 6—11 are not shown on this diagram because they are used to connect flash memory chip on most modules. Trying to use these pins as IOs will likely cause the program to crash.
返回頂部