Now if you can see from the picture? I am getting data repeated. Yes I can get each sensor to display itself by itself. But that's not what I need. I need to be able to display 2. Yes I held (1) in hand and blew in it. The CO2 went up on BOTH. While other was away.
Obviously when you are able to get this point started you can repeat this process (x) amount of times. The data from the sensors are being overwritten. I have changed the HEX variables as you see but did nothing. Without being able to display properly I won't be able to control the relays afterward. When this step is completed it is for a "Mushroom fruiting chamber x2". Which is why I need this to be working as soon as possible! If you live in Wisconsin I will hook you up with some mushrooms for the help! Any and all species. When setup is complete.
Nope it's code. When I blew on it they BOTH changed(ALL 6 DATA POINTS). And EXACTLY the same #'s sooooo scientifically. It's safe to say that's impossible.
Okay... see if you can "force" a value (rather than reading instrument #1, set it to a value) and see if the other follows... then do the same with #2.
[late edit] Is this a third device? TCA9548A(1); I see you are using that as the OLED.
[/edit]
I am pretty sure that it has to deal with the memory for the data.
Wire.write(0x21);
For example.
But as I said in the second one I changed and same results. Repeating data.
The TCA is the I2C Multiplexer. And the number inside it is the channel.
meaning swap sensors? LOL? Is that a joke? Same results. Yes I have tested each individually when I received them. They work fine. With the standard "Serial print code in examples."
I can get and display 1 sensor to display perfectly not a problem!
It's when connecting 2 or more where you get the problem!
So, using the ( TCA9548A) I2C Multiplexer board you can achieve that.
I did.
But the conflict is the data being written over each other. One takes president over the other. Also I am not sure why they want you to read and get the data (twice once in setup and another in void). But that's how it works? YES I HAVE RULED OUT ALL ERROR! BLEW ON ETC......THE CHANGES ARE EXACT! EVERY TIME! SCIENTIFICALLY IMPOSSIBLE!
I need someone who knows really well about this memory allocation and HEX!
This will help solve my problem........ANYBODY?
So it does see them all. Still don't help me much for anything.
As I said I need help with the memory over writing itself with the data.
Thanks.
Edit* Can't reply.
Thanks for the effort. But any other libraries like "Adafruit,Sparkfun" don't work at all!
This was the ONLY way it worked! I would say?.....THEY DON"T SUPPORT WHAT I AM TRYING TODO AT THE MOMENT?...... I can't even get 1 sensor to display using their method. So to attempt to display more than 1 would be asking to smash your head?!
I don't know but this is what I got and what works so far. Got a better source code from "sensirion". Also to answer your question as it may seem in the code? One address is for the register and the other is the memory allocation itself. Why it has (2) Wire .write() methods. I have tried reading over the datasheet for the sensor and no help for multiple devices.
Yes I am calling those in SETUP and VOID. Sensor 1 on channel (2).
I changed them to see what will happen? But nothing. Sorry about posting a test but everything on the first sensor was correct. I did update the code for both though now for nomore confusion. But that's what I had in the begining. So problem remains....
Found I2C 0x0 looks weird. Should only show the 0x62 for the sensor fixed address.
I'm not familiar with this sensor. I assume you are writing commands directly to the sensor registers to avoid using a library? Might want to try it first with the library, instantiating the sensor objects, etc and then work on eliminating the library calls?
I looked at the data sheet. You are not calling 0x21b1 or 0xec05 on sensor 2 in your scketch so how does it know when to start and read a measurement? And I don't see a command for 0x4523 or 0xe005 in the datasheet table. ?