ESP32 7 inch display - how to connect sensor using i2c pin and also use touch with it

2»

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.

Sign In or Register to comment.