kaczakat wrote: I uploaded the already working code to you a couple of days ago, just inserted a delay(5000) because I was typing the answers from my finger.
Actually, it's just that a few days ago it was black magic for me, and now I'm starting to understand the code.
Added after 11 [hours] 17 [minutes]:
Hi everything works as I wanted, I have a question about the following part of the code:
.
do i understand this correctly
- checking if something has arrived via uart
- if yes, I put the first received character into the first element of the buffer
- if the buffer is big enough I increase the index i2
- read the received character into the second buffer element, why is it the second received character and not the first again, after reading the first character from the received string, is the first character automatically deleted?
One more thing I need to do in the code for the ESP8266 module:
- I send a command from a smartphone e.g. ON I expose a state of 1 on the GPIO but for say 5 minutes and then the state of the GPIO changes to 0, but while this lasts for 5 minutes I would like to interrupt this time e.g. with an OFF command. Delay is out because it is a blocking function