Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

so its a lab where python will send R,G,B to Arduino IDE Mqtt. then arduino will send to m5stick c i want a python code

so its a lab where python will send R,G,B to Arduino IDE Mqtt.
then arduino will send to m5stick c
i want a python code where
1. i can see this graphics
2. initial a blank space - black. as i input in one the rows R,G,B and click on set color. other rows will auto fill 0s
3. and the one with input will change the blank space color according to it.
4. and the input color change signal will be sent to arduino IDE
5. when clicked toggle light it will reset.
image text in transcribed
image text in transcribed
image text in transcribed
The Python Program (Your computer) (name your program controller.py) This program should have a user interface to view the status of the lightbulb and provide a way to change the color and status. It should have corresponding subscription and publishing topics to the arduino program. The graphical user interface should be designed with tkinter, and should look something like this at the start: Note: The exact design is up to you! At first, when you launch the program, the status is unknown, and the color is black. After receiving a status update, it should look something like: You should be able to edit the R,G,B values and set the color, and toggle the light: Light Status ON Wed Feb 15 05:59:23 2023 Hitting the MS (front) button on the M5STickCPlus should still toggle the light on and off, and that should be reflected in the python interface. Here are some helpful functions from my solution: Note, this last one is important. You have two event-driven systems, with different event loops. They both need to runl At the last two lines in my program, I run

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions