I have gone back and re examined the video Example 8 as previously pointed to in earlier comments to this post.
OK the penny has dropped, and I finally get it and understand.
It is all a case of just finding a library which you can pass &Wire1 as part of the constructor for the device you want to use. I have found one for the BME280 - https://github.com/bolderflight/bme280 this works just fine with the touch screen.
Now I need to find one for my DS3231 RTC.
I would like to thank those who have taken the time to comment and help, but if you have already found one for the DS3231 then could you please put a comment in this post for me to try.
I try to connect ADS115 to the board. Tanks to david i found a very simple solution.
define pointer pWire with "TwoWire* pWire" before setup function.
Initialize pointer in setup function with "pWrire =&Wire" after initializing the screen.
use pWire-> instead of wire.
for example "pWire->BeginTransmission(ADR_ADS1115)" etc.
I also have a problem with i2c and temperature sensor SHT31D.
In my case, if I use the sensor library, I have no display image.
ESP32 works, I get information on the serial port but no image on the screen.
Please Elecrow put some sample code so that we can work with our selected i2c devices, however we use touchscreen and display together with them.
Comments
I have gone back and re examined the video Example 8 as previously pointed to in earlier comments to this post.
OK the penny has dropped, and I finally get it and understand.
It is all a case of just finding a library which you can pass &Wire1 as part of the constructor for the device you want to use. I have found one for the BME280 - https://github.com/bolderflight/bme280 this works just fine with the touch screen.
Now I need to find one for my DS3231 RTC.
I would like to thank those who have taken the time to comment and help, but if you have already found one for the DS3231 then could you please put a comment in this post for me to try.
Further to my last post. All libraries found and all now working.
I try to connect ADS115 to the board. Tanks to david i found a very simple solution.
define pointer pWire with "TwoWire* pWire" before setup function.
Initialize pointer in setup function with "pWrire =&Wire" after initializing the screen.
use pWire-> instead of wire.
for example "pWire->BeginTransmission(ADR_ADS1115)" etc.
Sorry, mistake in the comment before.
"pWire =&Wire1" in Setup() function is right.
Please send me your all working code for i2c device.
I also have a problem with i2c and temperature sensor SHT31D.
In my case, if I use the sensor library, I have no display image.
ESP32 works, I get information on the serial port but no image on the screen.
Please Elecrow put some sample code so that we can work with our selected i2c devices, however we use touchscreen and display together with them.
Edit:
I did it.
Instead of the Adafruit library, I used this one:
https://github.com/RobTillaart/SHT31/tree/master