-->
Page 1 of 1

promiscuous mode pin change

PostPosted: Mon Jul 10, 2017 8:32 pm
by stern0m1
I am trying to program the esp8266 so that when it detects a certain beacon in promiscuous mode it should change a pin from high to low.

If I delay 1 millisecond in the loop I am able to change the status of the pin (when it detects a certain beacon) however it resets if I try delaying in between the status change.

If I dont delay in the loop it doesnt reset but it doesnt change the status.

Now, I tried turning off promiscuous mode before I change the status but it doesnt help.

Bottom line, I need the delay in the loop for the status to change but I cant have two delays, in the loop and in the promiscuous callback.

Any suggestions will be greatly appreciated.

Thanks

Re: promiscuous mode pin change

PostPosted: Mon Jul 10, 2017 9:22 pm
by stern0m1
The solution I found was to use a timer instead of delay(). delay is essentially a timer... but for some reason creating my own timer works...