Reference
Base Units
AnalogIn Reads analog input values between 0 and 1. Typically used for sensors that output a range of values, such as potentiometers or light sensors.
AnalogOut Writes analog output values between 0 and 1. Useful for controlling devices like dimmable LEDs or motor controllers.
DigitalIn Reads digital input values as boolean true/false. Commonly used with buttons, switches, or other on/off signals.
DigitalOut Writes digital output values as boolean true/false. Often used to control relays, LEDs, or other binary devices.
Generators
Timing
Alarm Triggers an event after a specified time duration. Can be used to schedule delays or time-based actions.
Chronometer Measures elapsed time since the start or reset. Useful for timing events or profiling system performance.
Metronome Produces a periodic tick at specified intervals. Often used in rhythmic applications such as sound or light pulses.
Filters
MinMaxScaler Scales signals to fit within a specified minimum and maximum range. Essential for normalizing input signals from diverse sources.
Normalizer Adjusts signals to have a zero mean and unit variance. Useful in signal processing pipelines where consistent scaling is required.
PeakDetector Detects peaks (local maxima) in input signals, allowing for event-based processing such as edge detection.
Smoother Reduces noise and fluctuations in input signals using smoothing algorithms like exponential moving averages.
Fields
PivotField Generates a spatial response curve based on a pivot point around which the field transitions happens, making it ideal for creating animations such as VU-meters or fades on arrays of actuators such as LEDs or motors.
TimeSliceField Collects values over time which can then be sampled spatially like an array accross a normalized range. Useful for plotting time-varying signals, such as mapping audio or sensor input onto an LED strip or a motor array.
Functions
mapFloat() Maps a float value from one range to another. Useful for adapting input ranges to the desired output domain.
mapFrom01() Maps a float value from the normalized [0,1] range to a custom range, such as [-10, 10].
mapTo01() Maps a float value from a custom range to the normalized [0,1] range, simplifying calculations for normalized operations.
randomFloat() Generates a random float between 0 and 1, ideal for simulations or procedural generation.
seconds() Returns the current time in seconds since the program started, enabling precise time tracking.
wrap() Wraps a value within a specified range, making it cyclic. Commonly used for angles or periodic parameters.
Structure
Engine A control structure managing an ensemble of units, handling their initialization, update, and timing, ensuring they remain synchronized.
begin() Initializes the system, similar to Arduino’s setup() function. Sets up necessary configurations and prepares units for operation.
step() Repeatedly called during the program’s execution, akin to Arduino’s loop() function. Drives the execution of the main logic.
[] (arrays) Allows the creation of arrays of Plaquette units for batch operations. Facilitates efficient processing of multiple units simultaneously.
. (dot) Provides access to an object’s methods and data, enabling intuitive object-oriented programming with Plaquette units.
>> (pipe) Sends data across units from left to right, creating a streamlined and intuitive flow of information between connected units.
Extra
Easings Provides easing functions for smooth and natural transitions between values. Commonly used in animations and motion design.
ContinuousServoOut Controls a continuous rotation servo motor by setting its speed and direction. Ideal for robotics or mechanical motion control.
ServoOut Controls a standard servo motor by setting its angle. Useful for applications like robotic arms or pan-tilt systems.
StreamIn Streams input data continuously, allowing real-time signal processing from external devices.
StreamOut Streams output data continuously, enabling real-time control of external actuators or visualizations.