Ejemplo n.º 1
0
def resetModem(resetPin):

    setPixel(0,0,255) # set RGB to blue

    # toggle RST pin
    resetPin.value = 1
    sleep(0.1)
    resetPin.value = 0
    sleep(0.1)
    resetPin.value = 1

    for x in range(0,45): # wait 45 seconds for modem to startup
        setPixel(0,0,255) # blink RGB between blue/pink
        sleep(0.5)
        setPixel(255,105,180) # pink
        sleep(0.5)
Ejemplo n.º 2
0
from board import *
import busio
from time import sleep
from pixel import setPixel

# Modem UART
uart = busio.UART(D4, D3, baudrate=19200)

print("Welcome to the AT Workshop ... lets check your wiring")

# reset modem
reset = DigitalInOut(D2)
reset.direction = Direction.OUTPUT

print("Step 1: Reset Modem (~45 seconds ugh!)")
setPixel(0, 0, 255)  # set RGB to blue

# toggle RST pin
reset.value = 1
sleep(0.1)
reset.value = 0
sleep(0.1)
reset.value = 1

for x in range(0, 45):  # wait 45 seconds for modem to startup
    setPixel(0, 0, 0)  # blink RGB
    sleep(0.5)
    setPixel(0, 0, 255)
    sleep(0.5)

print("Reset Finished")