-
Apologies for being the (relative) moron here :), quite a learning curve..
I am looking at the datasheet, not spotting clues.
https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BMP280-DS001-18.pdfcould it be reading from the wrong address still?
-
i am using a Puck.js
That definitely did the trick, great! Guess I will have to read up on why.So I don't need to do the pinMode lines?
I am getting a reading, but somehow they don't change. I have had a sensor with a similar chip before and they normally are very sensitive. Am I missing something?
var i2c = new I2C(); i2c.setup({scl:D2,sda:D1}); var bme = require("BMP280").connect(i2c); console.log(bme.getData()); setInterval("console.log(bme.getData())",1000);
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v93 Copyright 2016 G.Williams >{ "temp": -0.00000017881, "pressure": 0.01541300212 } =undefined { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": 0.00312499999, "pressure": 500.01877148359 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": 0.00312499999, "pressure": 500.01877148359 } { "temp": 0.00312499999, "pressure": 500.01877148359 } { "temp": 0.00312499999, "pressure": 500.01877148359 } { "temp": 0.00312499999, "pressure": 500.01877148359 } { "temp": 0.00312499999, "pressure": 500.01877148359 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": -0.00000017881, "pressure": 0.01541300212 } { "temp": -0.00000017881, "pressure": 0.01541300212 } >reset(); =undefined
-
unfortunately, it still doesn't want to play ball...
The espruino BMP280 page has this configuration:
Device Pin Espruino
1 (GND) GND
8 (VCore) 3.3
3 (SDI) B9(I2C1 SDA)
4 (SCK) B8(I2C1 SCL)
2(CSB) 3.3
5(SDO) GND
6(Vio) 3.3I have SDA on D1 and SCL on D2
I have SBO on D28 and CSB on D29Then in the code I put D28 to GND and D29 to 3.3v
The I2C pins need to be pulled up, not sure if I am doing that correctly.The code on the BMP280 page requires the BME280 module, I changed that into BMP280, assuming that is a mistake.
digitalWrite(D28,0); digitalWrite(D29,1); pinMode(D1, "input_pullup"); pinMode(D2, "input_pullup"); I2C1.setup({scl:D2,sda:D1}); var bme = require("BMP280").connect(I2C1); console.log(bme.getData());
When running I get this error, not being able to write to the address..
> > _____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v93 Copyright 2016 G.Williams >Uncaught InternalError: I2C Write Error 33281 at line 1 col 20 a.writeTo(118,[b,e]) ^ in function "write" called from line 1 col 43 ...s.write=c;this.write(244,39);this.write(245,160);this.readCo... ^ in function "f" called from line 1 col 101 ...(b,e){a.writeTo(118,[b,e])}) ^ in function "connect" called from line 1 col 41 var bme = require("BMP280").connect(I2C1); ^ Uncaught Error: Field or method "getData" does not already exist, and can't create it on undefined at line 1 col 16 console.log(bme.getData()); ^ =undefined >
-
only just found the BMP280 module :)
https://www.espruino.com/BMP280#line=3,3,7,7,11,11If only I could delete a whole conversation...
-
-
-
Some people are saying that for the BMP280 compared to the BMP180/085, the I2C ADDRESS changed from 0x77 to 0x76.
a forum post:
https://github.com/adafruit/Adafruit_BME280_Library/issues/15But I changed all the 0x77 in the BMP085.js to 0x76, but no change, same error except the 119 becomes 118;
Uncaught InternalError: I2C Write Error 33281
at line 1 col 23
this.i2c.writeTo(119,a),this.i2c.readFrom(119,1)[0]; -
First of all, I am assuming the BMP280 can work with the module BMP085, just like the BMP180 did..?
Here is how I connected it, D1 and D2, GND and 3V
I am trying to use the code from this page:
https://www.espruino.com/BMP085I2C1.setup({scl:D2,sda:D1}); var bmp = require("BMP085").connect(I2C1); setInterval(function() { bmp.getPressure(function(d) { console.log("Pressure: " + d.pressure + " Pa"); console.log("Temperature: " + d.temperature + " C"); }); }, 1000);
The console gives me a range of errors though.
I am using the standalone IDE, judging by the load time it gets the module from the 'require' statement just fine. I also put the module in the module directory, no difference.
Any idea what I am doing wrong? Thanks..
Here is the console output:
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v93 Copyright 2016 G.Williams >Uncaught InternalError: I2C Write Error 33281 at line 1 col 23 this.i2c.writeTo(119,a),this.i2c.readFrom(119,1)[0]; ^ in function "read8" called from line 1 col 99 ...oss=3);var b=this.read8(208);if(b!=85)return console.log('Ba... ^ in function "BMP085" called from line 1 col 15 new BMP085(a,b); ^ in function "connect" called from line 1 col 41 var bmp = require("BMP085").connect(I2C1); ^ =undefined Uncaught Error: Field or method "getPressure" does not already exist, and can't create it on undefined at line 1 col 4 bmp.getPressure(function(d) { ^ in function called from system Uncaught Error: Field or method "getPressure" does not already exist, and can't create it on undefined at line 1 col 4 bmp.getPressure(function(d) { ^ in function called from system Uncaught Error: Field or method "getPressure" does not already exist, and can't create it on undefined at line 1 col 4 bmp.getPressure(function(d) { ^ in function called from system Uncaught Error: Field or method "getPressure" does not already exist, and can't create it on undefined at line 1 col 4 bmp.getPressure(function(d) { ^
-
-
-
-
maybe an AT command for turning on/off the cellular radio would have the same effect as far as power consumption is concerned, do you know if such an AT command exists?
Mind you my thinking isn't hindered by practical experience... AT commands maybe deal with just the network, not the inner workings of the module itself
-
-
-
-
-
-
-
-
-
I would like to use a static puck to inform me of the whereabouts and status of another moving puck by sms. That should be possible with the Adafruit FONA or GSM800 GSM module right?
Serial port should be able to control that right? Just wonder if the puck could also turn on the GSM so it isnt on all the time losing battery...
Would be great..
i get the same numbers even without anything connected :(