Ravel Kit API#
This API is designed for the Ravel Kit and extends the UCUq API. To simplify implementation, it abstracts away the hardware-specific aspects (communication protocols, pins used, etc.).
Buzzer#
ucuq.ravel.Buzzer()(constructor): returns an object for manipulating the buzzer;- for other methods, see
ucuq.Buzzer
Ring#
ucuq.ravel.Ring(<offset>)(constructor): returns an object for manipulating the RGB ring.<offset>defines the LED with index 0.- for other methods, see
ucuq.WS2812
OLED#
ucuq.ravel.OLED()(constructor): returns an object for manipulating the OLED display;- for other methods, see
ucuq.SSD1306_I2C.
LCD#
ucuq.ravel.LCD()(constructor): returns an object for manipulating an LCD display;- for other methods, see
ucuq.HD44780_I2C.
Upper#
ucuq.ravel.Upper()(constructor): returns an object for controlling the upper servo;Upper.set(<value>): sets the servo to the value<value>(between 0 and 6554, inclusive);Upper.get(): returns the servo’s position;Upper.park(): sets the servo to its rest position.
Lower#
ucuq.ravel.Lower()(constructor): returns an object used to manipulate the upper servomotor;- for other methods, see
ucuq.ravel.Upper.
Ravel#
ucuq.Ravel()(constructor): returns an object used to manipulate the entire kit;Ravel.raz(): resets all components of the kit;Ravel.buzzer(): returns the kit’s Buzzer object;Ravel.ring(): returns the kit’s Ring object;Ravel.lcd(): returns the kit’s LCD object;Ravel.oled(): returns the kit’s OLED object;Ravel.upper(): returns the kit’s Upper object;Ravel.lower(): returns the kit’s Lower object;Ravel.displayRingGauges(): displays a gauge on the LCD showing the RGB values of each LED in the ring; requires a prior call toLCD.uploadUpwardGaugeChars().
Constants#
SERVO_MAX: maximum value for the position of the Upper and Lower servos;RING_MAX: maximum value for each color (R, G, and B) of the Ring LEDs;RING_SIZE: number of LEDs in the ring;OLED_WIDTH: number of horizontal pixels on the OLED screen;OLED_HEIGHT: number of vertical pixels on the OLED screen;LCD_WIDTH: number of characters per line on the LCD display;LCD_HEIGHT: number of lines on the LCD display.