Toggle Navigation
Hatchery
Eggs
Grove Digital light sensor
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
from Grove_Digital_light_sensor import tsl2561 from machine import I2C, Pin import ugfx, appglue, easydraw, badge, orientation orientation.default() easydraw.msg("kop","body", True) badge.init() i2c = I2C( sda=Pin(26), scl=Pin(27), freq=100000) sensor = tsl2561.TSL2561(i2c) while True: easydraw.msg(sensor.read(),"Light output",True)