# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

from pynq.overlays.base import BaseOverlay
base = BaseOverlay('base.bit')

from pynq.lib.pmod import *

sensors = [Grove_PIR(base.PMODA, port) for port in (PMOD_GROVE_G1, PMOD_GROVE_G2)]
bar = Grove_LEDbar(base.PMODB, PMOD_GROVE_G4)

while True:
    display = 0
    for i, s in enumerate(sensors):
        display |= s.read() << i
    bar.write_binary(display)

StarcoderdataJupyterScriptsDedupFiltered