Connecting the BMP280 barometric sensor to the Puck, lots of ERROR messages.. #945
Replies: 20 comments
-
Posted at 2017-07-26 by user79451 Some people are saying that for the BMP280 compared to the BMP180/085, the I2C ADDRESS changed from 0x77 to 0x76. a forum post: But I changed all the 0x77 in the BMP085.js to 0x76, but no change, same error except the 119 becomes 118;
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-26 by ClearMemory041063 The Datasheet can be found at: Look at the section on I2C |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-26 by user79451 Saw the datasheet, thanks. I tried all possible variations connecting the SDO to either Vcc or ground, no change in the error message so far. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-26 by user79451 Conecting it like this.. with SDO to ground for the default address 0x76, CSB to 3v so I2C gets selected.. Still same error message |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-27 by user79451 only just found the BMP280 module :) If only I could delete a whole conversation... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-27 by @gfwilliams :D I was reading through this and thinking I'm sure we had something for BMP280... And it all works fine now? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-27 by user79451 unfortunately, it still doesn't want to play ball... The espruino BMP280 page has this configuration: Device Pin Espruino I have SDA on D1 and SCL on D2 Then in the code I put D28 to GND and D29 to 3.3v The code on the BMP280 page requires the BME280 module, I changed that into BMP280, assuming that is a mistake.
When running I get this error, not being able to write to the address..
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-27 by @gfwilliams Does your module have pullup resistors on it? I2C needs them to work. However, you could try software I2C:
Software I2C can use the chip's internal pullups, so might be able to work without external ones. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-27 by user79451 i am using a Puck.js 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?
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-27 by @gfwilliams By the module having pullup resistors, I meant the actual BMP280 :) You won't need pinMode, no... it's done automatically by software I2C. Honestly I'm not sure why it wouldn't be changing - it could be something to do with the way it is initialised in https://github.com/espruino/EspruinoDocs/blob/master/devices/BMP280.js - are you used to looking around in the datasheets. I guess they might give you some clue... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-27 by user79451 Apologies for being the (relative) moron here :), quite a learning curve.. I am looking at the datasheet, not spotting clues. could it be reading from the wrong address still? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-27 by user79451 i get the same numbers even without anything connected :( |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-27 by @gfwilliams You don't seem to have set up the SDA and CSB lines in the code above... could that be it? Also, I might be a bit wary of using D28/D29 - they're used as the Puck.js serial interface wires if Puck.js powers up with D29 pulled high. While you can override them with |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-27 by user79451 The code, with
giving me the same figures as if nothing was connected:
I don't see where I am different from the BMP280 module page ... I was checking with a buzzer and i do see that the beep coming from 3v and GND off the Puck is a lot stronger than the D30 D31 combination, kinda weak.. but that may be normal |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-27 by user79451 Well, I said I was a beginner. When you stick a pin in the Puck it makes a proper connection. But with the BMP280 it makes no connection at all. Or worse, some do and some don't. Getting myself a proper board to fiddle, and soldering on pins is probably not a bad idea either :) Thanks for the help anyway, much appreciated. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-28 by @gfwilliams Argh - yes... looking at the pics the wires were in so far I assumed that you'd soldered them! I really wish someone would make some nice PCB-PCB patch wires that made proper contact, but I haven't seen any :( That's the annoying thing with embedded electronics - you never know if it's a software ort hardware problem :) So have you got it working now then? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-28 by user79451 All working very well, thanks. The bmp280 is very sensitive to air pressure, nice. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-28 by user79451 might as well remove this thread, misinformation from my side, looks like me thinking out loud :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-28 by @gfwilliams I'd like to keep it, if that's ok? There's still some pretty helpful stuff in there - especially if people google for certain error messages like the 33281 one :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-28 by user79451 no problem :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-26 by user79451
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/BMP085
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:
Beta Was this translation helpful? Give feedback.
All reactions