11
CircuitPython - Trying to set pin value
(infosec.pub)
submitted
1 week ago* (last edited 1 week ago)
by
TheButtonJustSpins@infosec.pub
to
c/python@programming.dev
New to CircuitPython, this feels like it should work according to the docs but it prints six False
s. Any ideas?
#!/usr/bin/env python
import board
import digitalio
import time
class body_controller:
def __init__(self):
SWDIO = board.D5
self._reset_pin = digitalio.DigitalInOut(SWDIO)
print(self._reset_pin.value)
self._reset_pin.switch_to_output(True)
print(self._reset_pin.value)
def turn_on(self):
print(self._reset_pin.value)
self._reset_pin.value = False
print(self._reset_pin.value)
time.sleep(1)
print(self._reset_pin.value)
self._reset_pin.value = True
print(self._reset_pin.value)
body = body_controller()
time.sleep(1)
body.turn_on()
time.sleep(1)
If it's stuff you already own, the income would be based on the difference between what you paid for it and what you get for it. Likely, you're selling at a loss, so that's not income.
Notes: IANAL and have never been on unemployment.