# mPy - lamp test on PortA
# by Anthony Vogelaar, Perth Scotland
# rev 0.10  2024-11-01  initial release

from	machine	import	Pin
import	time
from	mve_rw2050	import	portA

# =========================== Hardware set-up =============================

RED   = 0			# 0V0
GREEN = 1			# 3V3

outputs   = [Pin(pin_nr, Pin.OUT, value=RED) for pin_nr in portA]

# ============================= local ===========================

# delay for dly seconds, print '*' @ 1 Hz and background task @ 10 Hz
def delay(dly):
    for tSec in range(dly):
        for t100mS in range(10):
            pass						# nothing to do for background task
            time.sleep(0.1)
        print('*', end='')

# =============================== main ====================================

class Main:
    
    def __init__(self):
        while True:
            for output in outputs:
                output(1)
                delay(1)
                output(0)

    
Main()

# ================================= End =====================================

