Basic console print script
This commit is contained in:
parent
bb71209da5
commit
60309ee2bb
1 changed files with 18 additions and 0 deletions
18
src/consolecounter.py
Normal file
18
src/consolecounter.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
from peoplecounter import PeopleCounter
|
||||
from sensor.vl53l1xsensor import VL53L1XSensor
|
||||
import logging
|
||||
|
||||
counter = PeopleCounter(VL53L1XSensor())
|
||||
peopleCount = 0
|
||||
|
||||
logging.getLogger().setLevel(logging.INFO)
|
||||
|
||||
|
||||
def countChange(change: int) -> None:
|
||||
global peopleCount
|
||||
peopleCount += change
|
||||
logging.info(f'People count change to: {peopleCount}')
|
||||
|
||||
|
||||
counter.hookCounting(countChange)
|
||||
counter.run()
|
Loading…
Reference in a new issue