Using one ESP8266 for input+output


#1

Is there any way to use one ESP8266 and have input and output connected to it?
For example, if I want to use it for the light switch in the way the videos on youtube describe I need to have one for input and one for output, I was reading the ESP8266 for the door sensor and sprinkler system and noticed for the sensor it uses “outTopic” and for the other one"suscribeTopic" and for the sprinkler system there is one line which is not on the other code “client.subscribe(subscribeTopic);”
I tried to combine the two but it’s not working.
If you have the solution please share it. thanks


#2

Are you talking about MQTT or hardware?


#3

My question was about MQTT
Sorry I forgot to mention it


#4

Yeah. you can. i think there is an example in the pubSub client examples folder in the Arduino IDE.


#5

Thank you, i will check this out


#6

i have that working if You want i can send my firmware!!!


#7

First I’m sorry for not checking for a long time, And I will be very thankful if you do it.