include "tbh/global.tbh"
include "tbh/config.tbh"
include "tbh/serial.tbh"
?>
>
WWW Server
IP:
sock.setdata(net.ip)
sock.send
'during io operations we have to disable serial port since some pins are shared
serial0_disable()
?>
File: io.html
IO mapping:
J2 -> GPIO -> io.num
#5 -> P0.0 -> 1
#6 -> P0.1 -> 2
#7 -> P0.2 -> 3
#8 -> P0.3 -> 4
#9 -> P0.4 -> 5
#10 -> P0.5 -> 6
#11 -> P0.6 -> 7
#12 -> P0.7 -> 8
There is no explicit direction control.
To "measure" an external signal applied to a GPIO line,
set this line to HIGH first, then read the state of the pin.
It is OK to drive the pin LOW externally when the pin outputs HIGH internally.
Checked - HIGH, Unchecked - LOW