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

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

作者:lmdf | 更新時(shí)間:2016-10-19 | 瀏覽量:3294

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

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

1、GPIO6~GPIO11不要使用,否則引起存儲(chǔ)錯(cuò)誤,不停重啟;

2、GPIO16只能做為輸出,不能輸入,否則也會(huì)引起錯(cuò)誤

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

也許因?yàn)樾率?,不知道是不是別人早就知道呢?


評(píng)論:共5條

貝殼物聯(lián) 評(píng)論于:2016-10-19 22:41:12
以上說的是真的如此嗎?還沒遇到過,還請大神測試。
lmdf 評(píng)論于:2016-10-20 09:23:32
真的,實(shí)測結(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 評(píng)論于: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.
返回頂部