Notifications
Clear all

InqPortal - An ESP8266 IoT, Application, Web Server

96 Posts
8 Users
23 Likes
6,652 Views
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6983
 

@yurkshirelad How many pins on your board?

I don't have a CSB pin

My instructions come direct from AdaFruit for an AdaFruit board. The CS pin is only used for SPI.

I did read that some boards (knockoffs?) needed CS jumped to VIN and I tried it both ways.

Good try though.

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
 

Mine has 6 pins: VCC, GND, SCL, SDA, CSB, SDC. It looks to be this one (I didn't buy from them, it was the first reference I could find) - https://protosupplies.com/product/gy-bme280-pressure-humidity-temperature-sensor-module/. There's always a chance mine is actually a BMP280, not sure. I haven't used it for a while.

This post was modified 2 years ago by YurkshireLad

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

@yurkshirelad Mine is similar but nomenclature is VIN, 3Vo, GND, SCK, SDO, SDI, CS 7 pins. I only used 2 (SCK, SDO) and power of course. I am going to try one more test with external power, just in case.

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: 6983
 

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
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@zander

Posted by: @zander

@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!

The class object "Wire" is declared in <Wire.h>, where as "Wire2" from what I have read refers to a boards second interface, and I think some boards even offer a 3rd I2C interface.

In any case, before you decide it's dead, why not hook it up to an Arduino UNO, with heaps of documentation and examples to suit, to make sure of your findings?

Cost ya nothing 😉


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

@frogandtoad Ok, will do. I was kinda thinking of trying an ESP32, but an UNO might be a better approach.

I have much to learn so if you would indulge me.

While I assumed that Wire was a class in the Wire.h file, is Wire2 also?

I never used C++ professionally so I understand Wire is a class, but don't I need a 'real' Wire to pass the address of to the call to the method begin, or is that a constructor and this is the way that Wire the variable gets declared. Sorry to ramble, still learning. Similar question for Wire2.

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  

I think you've @zander done your do-diligence.  We've identified which of the 7 pins on this Adafruit BME280 have to be used for I2C.

SCK => D1

SDI => D2

VIN => 3V3

GND => G

Although I use a different I2C scanner, it checks all ESP pins in all permutations.  So if the SCK and SDI on the BME pins are wired to the wrong pins the scanner would still find it.  If it reports no devices are present, only two answers exist - your using string instead of wire or it's toast!

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: 6983
 

@inq Can you post your scanner?

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
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2532
 
Posted by: @inq

If it reports no devices are present, only two answers exist - your using string instead of wire or it's toast!

So put some strawberry jam on it and re-test 🙂

Anything seems possible when you don't know what you're talking about.


   
Inq and Ron reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6983
 

@frogandtoad I tried the UNO, ran it a second time specifying an addr of 0x76, ran it a 3rd time specifying 0x77 which I understand to be the primary and seconday addresses of this board although the AdaFruit I am fairly sure is 0x76 and the competitors are 0x77. In any case no change, I fear it is non-functional.

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  

I think I can, I think I can... https://github.com/jainrk/i2c_port_address_scanner/blob/master/i2c_port_address_scanner/i2c_port_address_scanner.ino

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


   
Ron reacted
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@zander

Posted by: @frogandtoad

The class object "Wire" is declared in <Wire.h>, where as "Wire2" from what I have read refers to a boards second interface, and I think some boards even offer a 3rd I2C interface.

Posted by: @zander

@frogandtoad Ok, will do. I was kinda thinking of trying an ESP32, but an UNO might be a better approach.

I have much to learn so if you would indulge me.

While I assumed that Wire was a class in the Wire.h file, is Wire2 also?

I never used C++ professionally so I understand Wire is a class, but don't I need a 'real' Wire to pass the address of to the call to the method begin, or is that a constructor and this is the way that Wire the variable gets declared. Sorry to ramble, still learning. Similar question for Wire2.

Well, this comes back to our class discussions not so long ago, not to mention our recent discussions around Arduino IDE instances 😉

In the header <Wire.h>, the real name of the class that handles I2C communications is called "TwoWire", however, an "instance" of "TwoWire" is provided as follows: 

 extern TwoWire Wire;

So, when we include <Wire.h> in our Arduino sketch, the instantiated "Wire" object is already available to us - As the Arduino only has 1 I2C interface, "Wire" is already available for use as soon as we declare the header.  However, ESP32 and other boards have two or more I2C interfaces, therefore if we wish to use "the other" I2C interface, we need to create another instance of "TwoWire", and that is probably what they meant by "Wire2" (OBJECT), but you could really name it anything you like.

Does that help?


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

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

@frogandtoad That does educate me but the problem was much more basic. An I2C scan reveals there is NO sensor detected. My sensor is dead, have ordered new.

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.


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

@frogandtoad Yes, used the sample verbatim. 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
Page 4 / 7