The Ultimate Cristmas Tree
firmware
- Pico-W Running Micro-Python on the Tree-PCBweb
- Blazor-Container in cloud handling the interactions with the userOnly download the contents of the firmware folder!
This section will describe the general protocoll between the website and tree.
The website makes HTTP Post request to the tree through the client browser, for now it will be assumed that the IP-address of the tree is known and that the user is on the same wifi as the tree.
The protocoll is based on JSON and the website sends a json-object through a HTTP request, the following requests are to be implemented on the pico.
Request from website
{
"request":"get active LS"
}
Response from tree
{
"time":[0.0,...,4.0],
"leds":[
[[255,0,0],...,[255,1,1]],
...,
[[255,0,0],...,[255,1,1]]
]
}
Request from website
{
"request":"set custom LS",
"lightshow":lightshow_obj
}
Response from tree, if the LS is valid
{
"lightshow_valid": "OK"
}