• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Relay modules on a I2C bus of a ESP32

Q&A Forum › Category: Home Automation › Relay modules on a I2C bus of a ESP32
0 Vote Up Vote Down
Arvin asked 7 years ago

Hi, do you have any code examples of using relay modules on a I2C bus of a ESP32 and controlling it using MQTT. I am using your Home Automation Tutorial to build my system but running out of GPIO

3 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 7 years ago

Hello Arvin,

Tomorrow (July 21), I’ll be publishing a new Module for the ESP32 course dedicated to MQTT. In that new module, I’ll be using an I2C LCD display. Which I2C component would you like to control? Can you post a link in the forum for your module?

Thanks

0 Vote Up Vote Down
Arvin answered 7 years ago

Hello Rui,
I am using Arduino Uno I2C bus connected to four PCF8574 modules to Drive two 8 CH relay modules and the remaining two PCF8574 will read outputs of 16* Current transformer modules.
I will subscribe to the topics to turn the relays on and off and will publish the current transformer readings on the network.

0 Vote Up Vote Down
Rui Santos Staff answered 7 years ago

I’ve just published the new Module about MQTT with ESP32: https://rntlab.com/esp32-with-mqtt-introduction/

I don’t have any examples with that exact component, but have you tried to use this library with the ESP32: https://playground.arduino.cc/Main/PCF8574Class

I haven’t looked if it’s compatible with the ESP32, but it might work.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.