valu= io(pi,pin)
Posted: Sat Feb 24, 2018 6:01 pm
hi Guys
I've been working with ESPBasic for a few days now.
But unfortunately I can not continue.
I want to set a pin high or low and then read it out immediately.
Unfortunately, it does not work.
Valu always stays 0
Also, the attempt to outsource the routine is reported with syntax error.
Would be nice if someone could help me.
Hopefully you can read this text.
He was translated with Google.
Thank you.
Michael S.
Version 1
let valu=99
cls
button "On",[on]
button "Off",[off]
button "Exit",[Exit]
pin= D1
[on]
io(po,pin,1)
valu= io(pi,pin)
print valu
wait
[off]
io(po,pin,0)
valu= io(pi,pin)
print valu
wait
[print]
print valu
wait
[Exit]
wprint |<a href="./edit"> Edit</a>|
end
---------------------------------------------------------------------------------------------------------
Version 2 (Function outsourced....Syntax error)
let valu=99
cls
button "On",[on]
button "Off",[off]
button "Exit",[Exit]
pin= D1
[on]
io(po,pin,1)
valu= io(pi,pin) [print]
print valu
wait
[off]
io(po,pin,0)
valu= io(pi,pin) [print]
print valu
wait
[print]
print valu
wait
[Exit]
wprint |<a href="./edit"> Edit</a>|
end
I've been working with ESPBasic for a few days now.
But unfortunately I can not continue.
I want to set a pin high or low and then read it out immediately.
Unfortunately, it does not work.
Valu always stays 0
Also, the attempt to outsource the routine is reported with syntax error.
Would be nice if someone could help me.
Hopefully you can read this text.
He was translated with Google.
Thank you.
Michael S.
Version 1
let valu=99
cls
button "On",[on]
button "Off",[off]
button "Exit",[Exit]
pin= D1
[on]
io(po,pin,1)
valu= io(pi,pin)
print valu
wait
[off]
io(po,pin,0)
valu= io(pi,pin)
print valu
wait
[print]
print valu
wait
[Exit]
wprint |<a href="./edit"> Edit</a>|
end
---------------------------------------------------------------------------------------------------------
Version 2 (Function outsourced....Syntax error)
let valu=99
cls
button "On",[on]
button "Off",[off]
button "Exit",[Exit]
pin= D1
[on]
io(po,pin,1)
valu= io(pi,pin) [print]
print valu
wait
[off]
io(po,pin,0)
valu= io(pi,pin) [print]
print valu
wait
[print]
print valu
wait
[Exit]
wprint |<a href="./edit"> Edit</a>|
end