kuukar-rpi/kuukar_lcd.py

21 lines
690 B
Python

import kuukar_nextion
class lcd:
def __init__(self) -> None:
self.nextion = kuukar_nextion.nextion()
self.nextion.send_command("page home")
def play_video(self,filename: str) -> None:
self.nextion.send_command("page video_player")
self.nextion.send_command("video.path=\"sd0/"+filename+".video\"")
self.nextion.send_command("video.en=1")
def pause_video(self) -> None:
self.nextion.send_command("video.en=2")
def resume_video(self) -> None:
self.nextion.send_command("video.en=1")
def stop_video(self) -> None:
self.nextion.send_command("video.en=0")
self.nextion.send_command("page home")