user117186
Member since Aug 2020 • Last active Sep 2024Most recent activity
-
- 6 comments
- 210 views
-
-
Hi.
I'm trying to get a BME280 working using I2C.
I can't seem to get it to work on my Pixl.js
Using the hardware I2C like this:
var BME = require("BME280"); I2C1.setup({scl:A5,sda:A4}); var bme = BME.connect(I2C1, { addr: 0x76 }); console.log(bme.getData());
I'm getting this error
Uncaught InternalError: I2C Write Error 33281 atUncaught InternalError: I2C Write Error 33281 at line 1 col 18 a.writeTo(c,[d,g]) line 1 col 18 a.writeTo(c,[d,g]) ^ in function "write" called from line 1 col 4 ^
When i try to use software I2C, it kinda works, but only the first measurement and the humidity is wrong.
var BME = require("BME280"); var i2c = new I2C(); i2c.setup({scl:A5,sda:A4}); var bme = BME.connect(i2c, { addr: 0x76 }); console.log(bme.getData()); // logs { "temp": 24.00835012295, "pressure": 961.35353842504, "humidity": 84.1865234375 } setInterval(function() { console.log(bme.getData()); // logs { "temp": -143.48718913660, "pressure": 1126.77476317288, "humidity": 0 } }, 1000);
Thing is, it does work on my Espruino Pico using this code:
var BME = require("BME280"); I2C1.setup({scl:B8,sda:B9}); var bme = BME.connect(I2C1, { addr: 0x76 }); console.log(bme.getData());
This logs the correct humidity, works with hardware I2C and continues to work (in a setInterval for example).
I don't know what to do at this point. Is I2C just broken on (my) pixl.js?
-
-
Hi,
i just got my new puckjs v2. Everything was working when i got it.
Here is how i apparently bricked it:
- flashed https://www.espruino.com/binaries/espruino_2v06_puckjs.zip (even tho it already had that version. realized that later)
- the next day: bluetooth connection would fail with the puck blinking red
- tried to hard reset it, but I'm always only getting red blinking leds
did i already brick it – anything else i can try?
- i measured the battery, its 2.8V
- can not find the puck on bluetooth anymore
- it's only blinking red sometimes. and I can't get it to reproduce
edit: previously could not get any led to light up. it now blinks red – content edited to reflect that
- flashed https://www.espruino.com/binaries/espruino_2v06_puckjs.zip (even tho it already had that version. realized that later)
Seems like the instability and incorrect values were caused by bad connections. I soldered it, and now it all works without problems..
Sorry for the ruckus.