This state is straightforward, there is no display component, so no screen, and no interaction. All it does is send a command to a Mugsy IoT coffee maker and return to the time state. That's done in tick
.
The purpose of this state is envisioned to send a "Brew a mug of coffee" command to a Mugsy. However, it can be used for anything similar. For example, it could send a command to IoT lighting or blinds (or both).
class Mugsy_State(Time_State): """This state tells Mugsey 'Make me a coffee' """ def __init__(self): super().__init__() # mugsy support self.background = 'mugsy_background.bmp' @property def name(self): return 'mugsy' def tick(self, now): # Once the job is done, go back to the main screen change_to_state('time') def enter(self): global low_light low_light = False pyportal.set_backlight(1.00) pyportal.set_background(self.background) board.DISPLAY.refresh_soon() board.DISPLAY.wait_for_frame()
What's this mugsy thing? From the site:
"Mugsy is the world's first hackable, customizable, dead simple, robotic coffee maker. Every aspect of your brew can be controlled, from grind size and water temperature to pour over pattern and bloom time. If you prefer simplicity, Mugsy will get out of the way. Just send it a text, a tweet or hit that Coffee Now button and your cup will be ready in the time it takes to get to the kitchen. "
It seems like the ideal thing to have a button on your alarm clock to tell Mugsy to make coffee before you even get out of bed. All that's missing is a robot butler to bring it to you in bed.
Page last edited March 08, 2024
Text editor powered by tinymce.