The pin voltages are:
Code: Select all
GND 0
TX1 3.3
RX1 3.3
RTS 0
CTS 0
IO 0
Code: Select all
import network
import utime
from machine import Pin
with open('error.log', 'w') as f:
for i in range(7, 12):
try:
pin = Pin(i, Pin.OUT)
pin.value(0)
except BaseException as e:
f.write("PinError: {}\r".format(str(e)))
f.write("pins set\r")
for _ in range(30):
utime.sleep(1)
Reading the pins also does nothing. If I ground IO to GND and run the following code:
Code: Select all
import network
import utime
from machine import Pin
with open('error.log', 'w') as f:
for i in range(7, 12):
try:
pin = Pin(i, Pin.IN, Pin.PULL_DOWN)
f.write("pin {} value is {}\r".format(i, pin.value()))
except BaseException as e:
f.write("PinError: {}\r".format(str(e)))
Code: Select all
pin 7 value is 1
pin 8 value is 1
pin 9 value is 1
pin 10 value is 1
pin 11 value is 1
Code: Select all
pin 7 value is 0
pin 8 value is 0
pin 9 value is 1
pin 10 value is 0
pin 11 value is 0
Others have gotten the Air602 IO working using the C SDK ( https://yoursunny.com/t/2018/Air602-blink/ ). So I wonder if there is something in the micropython implementation.
What am I missing?