ช่วยแก้ปัญหา หน่อยคับ พอดีผม ใช้ ESP 8266-12F อยู่ แล้วใช้ Arduino IDE 1.6.5 ในการ เขียนโปรแกรม แต่ติดปัญหาเรื่อง ไลบราลี่ Wire ในการที่ผมจะเอาข้อมูล จาก BH1750 ที่เป็น I2C อัพโหลด ไปที่ ตัว ESP 8266-12F แล้ว เกิดติดที่ ไลบราลี่ Wire โหลดไลบราลี่มาไว้ในตัว IDE แล้วก็ไม่ได้ ต้องแก้ยังไงคับ
ESP8266 ทำงานได้กับ I2C โดยใช้ไลบารีมาตรฐาน Wire API http://www.arduino.cc/en/reference/Wire
ขอ อ้างอิงตาม นี้ครับ
Wire – The ESP8266 should work with any I2C sensor you can throw at it – just use the same Wire API calls you’re used to. There are a few differences:
Wire.begin()
will assume pins 2 and 14 are SDA and SCL, but you can manually set them to any other pin by callingWire.begin([SDA], [SCL])
.ลองลงบอร์ด esp8266 ใหม่ตามนี้ http://www.instructables.com/id/Portable-installation-guide-of-Arduino-IDE-v165-fo/?ALLSTEPS
ผมลองคอมไพล์โคดที่ใช้ไลบารี Wire ให้ดู ไม่มีปัญหาครับ
การใช้งาน 1.6.5 กับ 1.6.8 ใช้งานกับ ESP8266 ได้ทุกรุ่นใช่มั้ยคับ เพราะ 1.6.5 ลองกับทุก วินโดว์ แล้ว ใช้ Wire ไม่ได้เลย
ขอบคุณคับ
ผมใช้ 1.6.8 ใช้ได้ครับ esp-12F ก็เช่นกัน ลองใช้ 1.6.8 ครับ