Notifications
Clear all

InqPortal - An ESP8266 IoT, Application, Web Server

96 Posts
8 Users
23 Likes
5,962 Views
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6662
 

@will I broke down and tried again, at least the message went away, but the sensor doesn't want to cooperate. I will check against the code you pointed me t to see if anything is different. I am using the adafruit sample.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  

Hey Ron,

Just getting back from my Library class.  We finished up the last class on the weather station talking about:

  • Predictive aspects of the Zambretti algorithm
  • How to calibrate the station for its location
  • Client side program
  • How to localize it for a different language
  • Metric versus Imperial
  • How to use the file system to show the right picture for the right weather condition.  I have some who are more interested in the cosmetic aspects.

Can you find a link or take a picture of your model of BME, I think that is the biggest hindrance for helping.  I know some have pins for both SDI and I2C (7 pins) some use a pin for both SDI and I2C (4-6 pins) and some only support one or the other.  Then, if I recall, the class I last used (I don't think it was Adafruit) had different constructors based on which standard you were using. It seems to be a crap shoot and I'd hate to advice you on one and it blow chunks.  Especially $14 caviar.  For that amount, I bought the whole class each an AHT10... because I was tired of making excuses for the POS DHT11's. 

 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6662
 

@inq Here are some pictures. I have gone ahead and ordered the same sensors as you use since at this point I can't tell if the sensor is bad or the board is bad.

IMG 6864
IMG 6865

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  
Posted by: @zander

@inq You and @will will be a good pair for finding the least expensive solution. Unfortunately I seem to always find the opposite.

@zander, @will - Well... no wonder. 

You know... if you only go into a Rolex store, it's hard to get a good deal.  I got my last Rolex on the street in Jamaica for $25.  😆 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Will reacted
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  

I2C Logic pins:

  • SCK - this is also the I2C clock pin, connect to your microcontrollers I2C clock line.
  • SDI - this is also the I2C data pin, connect to your microcontrollers I2C data line.

https://learn.adafruit.com/adafruit-bme280-humidity-barometric-pressure-temperature-sensor-breakout/pinouts

If you're using a WeMos or NodeMCU...

SCK => D1

SDI => D2

VIN => 3V3

GND => G

https://randomnerdtutorials.com/esp8266-pinout-reference-gpios/

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  
Posted by: @zander

@inq Now that my computer is working again, I want to get this weather station going. In my board selector it has NodeMCU8266 0.9 (ESP-12 Module) and NodeMCU 1.0 (ESP-12E Module). My board has no info like that, all I can see is 8266MOD. What do you think I should pick?

I missed some of these older ones - I've always used the 1.0.  I assumed the 0.9 was before my time.

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6662
 

@inq Wow, so the pins marked clock and data in are NOT the ones to use.I tried that earlier and just now, the status = bme.begin(); returns failure.

BTW, this is NOT your code, this is the AdaFruit BME280 sensor test sample sketch.

I have checked the wiring (what there is of it) and even taken the wires out and re-assembled. I am thinking it's a bad sensor. I just noticed something. In the error message is supposed to be the sensor ID but it is 0. I looked in the .h file and it is set to 280 as you would expect. I haven't attempted to read the C code yet. Here is screen prints of the code, and the output.

Screen Shot 2022 04 15 at 05.27.04
Screen Shot 2022 04 15 at 05.26.37

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6662
 

@inq That's the pins I am using.

WHY is D1 = GPIO5 = SCL. That's very confusing.

Anyway, still no work.

I just went back to the RandomNerd site and found a test sketch. My sensor does NOT respond to the test. 

It's an AdaFruit sensor so not likely a fake, it's probably fried. 

The test I am running is searching for ANY I2C device and nothing is found.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
 

Can you do this to override pin numbers (these are example pins). I've seen comments that the library defaults to Arduino pins and you have to override pins on other devices. I don't know if this is correct but it can't hurt to try.

Wire.begin(16, 17);
bme280.begin(0x76, Wire);

   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6662
 

@yurkshirelad I will try, but the I2C scan found no device, so I am afraid it's fried.

But let's try, first thing I need to know given what I have learned today so far is WHICH pins, it seems there are many names for one physical pin. I have not got a 16 or 17. Can you elaborate? A picture?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6662
 

@yurkshirelad My sample code tells me it's &Wire which is usual for a param/arg. BTW, is Wire pre-declared in one of the headers, cuz I don't got one and my sample code mentions Wire2 as in

// default settings
// status = bme.begin(0x76);
// You can also pass in a Wire library object like &Wire2
Wire.begin(5, 4);
status = bme.begin(0x76, &Wire2)

I don't have a Wire2 so changed it to Wire

 

I haven't got Wire declared, but there is an inclkude for Wire.h so I assume it's in there.

Didn't work. 

I swapped the ESP8266 and still nothing, so I am declaring this BME280 DEAD!

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
 

I picked random pins for an example. I think Wire is used in the BME280 library but you should already have the Wire library installed as a dependency. Sorry, I'm typing this on a tablet and I hate trying to research and investigate on this device.

Where did you buy it? I've seen comments that cheap BME280s can be BMP280s.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6662
 

@yurkshirelad It's a logo bearing board bought from PiShop. I know there is a Wire.h, what I don't know is if there is a Wire. I figure it wouldn't compile if it wasn't there even though it's unusual. It doesn't matter, I found and ran a scanner that tries every address and there is nothing found, the sensor is dead.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
 

I believe Wire is declared inside the BME280 library. Bah, dead sensor.  What a pain!


   
ReplyQuote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
 

I found a reference in my notes that the BME280 needs a pull up resistor on the CSB pin (chip select?) to select IC2. I'm not sure if this would make a difference in your case. Mine isn't the adafruit board though.


   
ReplyQuote
Page 3 / 7