Overview of p5.toio library
p5.toio is a library designed for the p5.js environment that allows developers to control toio™ Core Cubes. It simplifies the process of interacting with toio™ APIs within a creative coding context.
website·Indexed 29 days ago
https://tetunori.github.io/p5.toio/A library for interacting with toio™Core Cubes within the p5.js environment. It provides APIs for searching and connecting to cubes, controlling motors, lights, and sound, and managing various mat and ID classes such as P5tCube, CubeConnector, and TileMat.
CubeSensorChar class is used to interact with the sensor characteristics of a toio cube. It extends CubeChar and implements the CubeCharIF interface. It provides methods to read the cube's posture, shake level, magnet status, and flat status.DevMat03 class is a specialized implementation of the Mat class, used to define the properties and boundaries of a specific mat version (DevMat03).DevMat06 class extends the Mat class and defines the specific spatial boundaries and center point for the DevMat06 mat.CubeBaseIF interface defines the core properties and methods for controlling a toio cube. It is implemented by the CubeBase class. This interface provides access to various 'Char' objects that handle specific hardware functions (battery, buttons, lights, motors, etc.) and manages the connection state of the cube.Mat class is the base class for all mat types in p5.toio. Specialized mat implementations include TileMat, RingMat, and a series of development mats (DevMat01 through DevMat12).CubeCharIF interface serves as the base definition for cube characteristic interactions. It is implemented by several specialized classes including CubeBatteryChar, CubeButtonChar, CubeChar, CubeConfigChar, CubeIDChar, CubeLightChar, CubeMotorChar, CubeSensorChar, and CubeSoundChar.Sticker class (inheriting from StandardId) provides a mapping of sticker names to their corresponding numeric IDs. This is used to identify which sticker a toio cube is interacting with.ColorTileMat class is part of the positioning system and inherits from the TileMat class, which in turn inherits from the Mat class.CubeBatteryChar class extends CubeChar and implements the CubeCharIF interface. It is used to manage and read the battery level of a toio Cube. The class is identified by the UUID 10b20108-5b3b-4571-9508-cf3efcd7bbae.DevMat02 class inherits from Mat and defines the spatial boundaries and center point for the DevMat02 mat. It is used to determine if a specific coordinate is located on this mat.