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

  • SineWave Generates a smooth, periodic sine wave signal. Commonly used for oscillatory motion or smooth transitions.

  • SquareWave Generates a periodic square wave signal, alternating between high and low states. Ideal for toggling signals like blinking LEDs.

  • TriangleWave Produces a periodic triangle wave signal with a linear rise and fall. Useful for generating smoother oscillatory patterns than square waves.

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.

  • Ramp Generates a linear ramp signal over time. Commonly used for smooth parameter transitions like fading lights or scaling values.

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.

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

  • 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.