Current News

Moderator: Mmiscool

User avatar
By forlotto
#44138 still a no go but I did not copy paste the code I did it from memory this is the problem... Right now I need to have a button working because it is something that I use fairly often so I deleted the code that was not working and put a button on there however in this case security matters to a degree.

I will change this portion in the example...

OTHER than that do you care to test it in AP mode and tell me what your results are? What happens to me is the esp and the relay reboots.

I know that the hardware itself works because it works direct with a button. But as soon as I add in password protection things get ugly and I don't know if it is the way that I am expressing my code or some side effect from the latest iteration of basic.

I would love to get down to the bottom of this because the end result may leave me stranded if I don't in a bad way.

HERE IS THE CODE FOR REFERENCE

Code: Select allcls
pwda = "cool"
passwordbox pwdb
Button "ON" [check]
wait
[check]
if pwdb == pwda then [goforit] else wprint "wrong!!!"
wait
[goforit]
po D4 0
po D5 0
delay 1000
po D4 1
po D4 1
pwdb = ""
wait



From what I can tell... It seems like it loses all of the information stored in the variable after you push the button. Errr IDK something is buggy and I can't put my finger on it either something with comparisons in the if statement or something...

You don't need to add semicolons or anything like that I hope at the end of the line I would sure love to nip this one in the butt. Anyhow this is way on the other side of my home away from my router so doubt I'll be connecting to my wifi until I install a bridge.

hrmmmm maybe I need to try a different approach

Aha I see something I did not add actually in my code maybe this is the problem... Will try and post back....
The word " let "
User avatar
By Mmiscool
#44146 Hello,

There were 2 problems here.

One was with the firmware of which I am preparing to upload a new build of right now. The second is with your program.

In your if statement there was no goto command causing it to fail. On the basic side there was another problem that had to be fixed.

Code: Select allcls
pwda = "cool"
passwordbox pwdb
Button "ON" [check]
wait
[check]
if pwdb == pwda then goto [goforit] else wprint "wrong!!!"
wait
[goforit]
po D4 0
po D5 0
delay 1000
po D4 1
po D4 1
pwdb = ""
wait
User avatar
By forlotto
#44151 I did try goto as well last night it did not work either just reset ... Good to know I need an update to make it work because I believe I tried just about every avenue last night a few hours of coding for now I have a button and my android app is working ok thank god would suck to be locked out of your house ;)

Anyhow thanks guys for the help for now its working everything is currently password protected anyways. I will worry about the password protection side of things after the update. Got more work to do on the android side of things anyways.