Expand description
§WebSocket client library for Boppo tablets.
WebSocket client library for the Boppo Tablet for off-device programmable activities and control.
§client
Use client::connect to get a client::BoppoSender /
client::BoppoReceiver pair. Because each connection is independent, you
can connect to multiple tablets simultaneously without any global state.
§Globals Setup
connect_and_setup_globals and setup_globals wire one client
connection into boppo_core’s global HAL, enabling high-level APIs like
Button::B0.set_color(...) and the top-level
functions in this crate (audio::play, audio::stop_all_sounds, etc.).
Most functions outside of client require setup_globals to have been
called first and panic otherwise.
§Examples
Two examples are in the examples/ directory:
simple— buttons light up blue on press and play a snarefeatures— all buttons wired to lights, music, sound effects, and playback control
Modules§
- audio
- Audio playback functions
- client
- Direct WebSocket connection to a Boppo tablet.
- color
- Color constants and functions
- commands
- Shell command execution on the tablet.
- executor
- An async executor for activities
- internal
- Internal module for device and framework implementers.
- interpolation
- Utilities for interpolation between two values.
- language
- Obtain the current system language with
system_language() - lights_
plane - Utilities based on laying out the button lights on a cartesian plane.
- log
- A lightweight logging facade.
- update_
loop - Provides the
Updatabletrait for calling a function at a fixed interval.
Structs§
- Button
Event - A notification that a top button has been pressed or released
- Button
Events - A stream of top button press and release events.
- Buttons
- A selection of multiple
Buttons. - Framebuffer
- On “off-screen” buffer storing a color for each light on the tablet.
- Lights
- A selection of button lights on the tablet. There are 10 buttons with 4 lights each for a total of 40 lights.
- Main
Framebuffer - The colors that are displaying on the button lights or will be displayed after the next flush. All light color changes in this crate go through this Framebuffer.
- Short
Duration - An unsigned duration with millisecond precision.
Enums§
- Button
- One of the 10 top buttons.
- Column
- A column of
Buttons. When the side buttons face the user,Column::C0is the leftmost column, andColumn::C4is the rightmost column. - Easing
- An
Easingfunction affects how a value transitions (from 0.0 to 1.0) - Error
- Errors returned by this library.
- Light
Dir - The directions lights are positioned around the buttons.
- Row
- A row of
Buttons.
Functions§
- connect_
and_ setup_ globals - Connect to a tablet and initialize
boppo_coreglobals in one step. - setup_
globals - Wire a tablet connection into
boppo_coreglobals.