Hi ,
Its me again, I did my second experiment exercise which is im sending a boolean data to a reciever.
In this experiment the goal would be like this.
1st Show_Group1 will “on” if its 5mins already. it will on for 1 min only,
2nd Show_Group2 will “on’ if its 10 mins already. it will on for 1 min only.
3rd Show_All will on if its 15 mins already. it will on for 1 min only.
But there maybe a chance that the Show_Group 1 will on also once the Show_Group2 beacause of the time interval, so i made something like an enterlock in the code, im not sure if its realy right im just experimenting.
The code was compiled but its not giving me any output.
Hopping you can help me with this im nearly closer to my goal.
please check this link of my code.https://pastebin.com/qJXMHLCA
this is the error im geting in the esp32 dev kit.
Thanks in advance.
Regards.
Keven
E (356997) gpio: gpio_set_level(226): GPIO output gpio_num error
E (359997) gpio: gpio_set_level(226): GPIO output gpio_num error
Hello Sara,
I didn’t solve the problem but i manage to solve some issue somehow. but still my sketch still have a problem.
Hope you can help me, here is my sketch https://pastebin.com/pAgHZMAG
Problem 1. The the sender was not sending data to Address2. only adress1 and adress3 are receiving data. I cant find where is the issue?
Problem 2. I want to send the data showOn and ShowOff but with timing.
example: I have 3 groups of show in my sketch.
the 1st show_all, if its 15 mins sender send data showON to the c receivers Address then after 1 mins the data ShowOFF will be send in the same receivers Address.
the 2nd show_Group1, if its 5 mins sender send data showON to the c receivers Address then after 1 mins the data ShowOFF will be send in the same receivers Address.
he 3nd show_Group2, if its 5 mins sender send data showON to the c receivers Address then after 1 mins the data ShowOFF will be send in the same receivers Address.
Im using the millis() function and im not sure if im doing the right approach in this.
Maybe you can give me sudgestion of what is the best approach in my project.
Thank you in advance,
Regards
keven,
Hi.
Check that you’re using the right MAC address for that board. Try a sketch that only sends data to that board to see if there is something wrong with that board. If it works properly, it means there’s something wrong with your current code.
Using millis() is perfectly fine as long as it is properly implemented.
If you want to take a look at something similar that might be useful in the future, you can take a look at task scheduler: https://github.com/arkhipenko/TaskScheduler
At the moment, we don’t have any tutorials about that. And you would need to learn a new library and a new way of writing your code, but might be a good learning exercise.
It’s just a suggestion, using millis() is perfectly fine.
Regards,
Sara