예제 #1
0
                        lcd.FONT_DejaVu24,
                        0xEFAF0F,
                        rotate=0)
label_info3 = M5TextBox(20,
                        130,
                        "Status:",
                        lcd.FONT_DejaVu18,
                        0xEFAF8F,
                        rotate=0)
label_Akku = M5TextBox(20, 220, "Akku:", lcd.FONT_DejaVu18, 0xEFAF8F, rotate=0)
label1 = M5TextBox(20, 80, "ENC", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)
label2 = M5TextBox(20, 55, "Dir", lcd.FONT_DejaVu24, 0xFFFF00, rotate=0)
label3 = M5TextBox(180, 55, "PressBtn", lcd.FONT_Comic, 0xDFCF1F, rotate=0)
label4 = M5TextBox(180, 80, "Press_cnt", lcd.FONT_Comic, 0xDFCF1F, rotate=0)

faces_encode = face.get(face.ENCODE)

#faces_encode.setLed(1, 0xff0000)
#faces_encode.clearValue()
#print(faces_encode.getPress())
#print(faces_encode.getDir())
#print(faces_encode.getValue())

#port B grove, pin 3 GPIO26 as PWM output!
PWM0 = machine.PWM(26, freq=10000, duty=50, timer=0)
#PWM0.freq(1)
#PWM0.duty(0)
#PWM0.pause()
#PWM0.resume()
duty_cycle_def = 50
duty_cycle_pre = 0
예제 #2
0
from m5stack import *
from m5ui import *
from uiflow import *
import face
import time

setScreenColor(0x111111)

faces_rfid = face.get(face.RFID)
label2 = M5TextBox(32,
                   -3,
                   "M5 COVID BASTION",
                   lcd.FONT_DejaVu24,
                   0xFFFFFF,
                   rotate=0)
label3 = M5TextBox(41,
                   224,
                   "Test readings RFID",
                   lcd.FONT_DejaVu24,
                   0xFFFFFF,
                   rotate=0)
label0 = M5TextBox(65, 62, "UID:", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)
label1 = M5TextBox(134, 63, "rfidValue", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)

i = None
n = None
val = None
key = None


def buttonA_wasPressed():