วันอังคารที่ 7 มีนาคม พ.ศ. 2560

nodemcu esp8266 error: stray '\302' in program


error ตามด้านล่าง ครั้งเมื่อ upload code ไป nodemcu v2

node_begin1:2: error: stray '\302' in program

 const char* ssidย ย ย ย  = "GTECwifi"; ย ย ย ย ย ย ย ย

 ^

node_begin1:2: error: stray '\240' in program

node_begin1:2: error: stray '\302' in program

node_begin1:2: error: stray '\240' in program

node_begin1:2: error: stray '\302' in program

สาเหตุ
-copy code จากในเวป ดังภาพล่าง มาใส่ ใน sketch   จะสังเกต สีของkeyword จะไม่มี เช่น Serial


-วิธีแก้ไข

1.พิมพเข้าไปใน sketch ใหม่ทั้งหมด
2.หรือค่อยๆลบ อักขระที่มองไม่เห็น ลบไปทีละตัว 

-อีก1วิธีแก้ 
ให้เข้า www.blogger.com เลือกสร้างบทความใหม่ และวาง code ใส่  ให้ใช้เครื่องมือ  ล้างรูปแบบ แล้ว copy code ไปใส่ใน arduino ide



วันอังคารที่ 21 กุมภาพันธ์ พ.ศ. 2560

SDA(tx) SCL(rx) nodemcu

อ้างอิง
http://www.hoaglun.com/blog/2013/1/27/i2c-lcd-challenge

What is SDA and SCL?
SDA = TX Data
SCL = RX Data (Clock) 



nodeMCU
martinayotte wrote:The default pins are defined in variants/nodemcu/pins_arduino.h as SDA=4 and SCL=5, but those are not pins number but GPIO number, so since the pins are D1=5 and D2=4.
Anyway, you can also choose the pins yourself using the I2C constructor Wire.begin(int sda, int scl); - See more at: http://www.esp8266.com/viewtopic.php?f=13&t=10374#sthash.Ahy4UbNy.dpuf