Demo videoHardware
System Architecture
Software
Read moreSource code repository: https://github.com/ktetsuo/roulette_control
- The
RouletteMain
directory is a motor control firmware project for Raspberry Pi Pico W. - The
RouletteController_M5Core2
directory is a user interface project for M5Stack Core2.
In this article, we will focus on wireless communication and user interface.
Communication Protocol- Uses Bluetooth Serial for communicate UI and device.
- Send and receive binary packets using the MsgPacketizer library. The data flowing on the communication path is made as light as possible, making it possible to convey the current position of the roulette wheel to the UI with almost no delay. Because the library encapsulated the packet parsing, I was able to keep the application code simple.
- By using M5GFX from the M5Unified library, I was able to easily achieve high-speed screen drawing.
- By using the "sprite" function, smooth high-speed rotation without flickering has been achieved.
Previously, I used to set target values from a PC via USB serial, but thanks to M5Stack I was able to easily create a small controller. Now you can hide your controller and cheat!
Comments