i2cdetect sees the address correctly, and I have a JavaScript file that runs and updates a dashboard (Blynk) that works perhaps once every 10-15 attempts, but more often than not it will throw any one of the following three errors:
Code: Select all
Error: Cannot write to device
at i2c.writeByte (/home/pi/node_modules/i2c/lib/i2c.coffee:58:10)
at htu21d.readTemperature (/home/pi/node_modules/htu21d-i2c/index.js:70:14)
at Timeout._onTimeout (/home/pi/blynk1.js:26:9)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: Cannot write to device
at i2c.writeByte (/home/pi/node_modules/i2c/lib/i2c.coffee:58:10)
at htu21d.readHumidity (/home/pi/node_modules/htu21d-i2c/index.js:97:14)
at /home/pi/blynk1.js:29:13
at /home/pi/node_modules/htu21d-i2c/index.js:86:29
at Immediate.<anonymous> (/home/pi/node_modules/i2c/lib/i2c.coffee:73:9)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
Error: Cannot read from device
at i2c.read (/home/pi/node_modules/i2c/lib/i2c.coffee:71:10)
at Timeout._onTimeout (/home/pi/node_modules/htu21d-i2c/index.js:77:26)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)