diff --git a/docs/modules/audio_amp.md b/docs/modules/audio_amp.md index 6966a07..a7ee5c3 100644 --- a/docs/modules/audio_amp.md +++ b/docs/modules/audio_amp.md @@ -119,12 +119,14 @@ AMP_I2C_ADDRESS = 0x38 TEMPERATURE_THRESHOLD = 50.0 ``` + ### Variables ```python player: WavPlayer ``` + ### Functions ```python diff --git a/docs/modules/bench_power.md b/docs/modules/bench_power.md index 6b388da..70c126e 100644 --- a/docs/modules/bench_power.md +++ b/docs/modules/bench_power.md @@ -55,6 +55,7 @@ Power can now be provided to all modules, by calling. yukon.enable_main_output() ``` + ## Using the Module ### Controlling its Output @@ -94,9 +95,10 @@ VOLTAGE_MID_MEASURE = 1.1706 VOLTAGE_MAX_MEASURE = 2.2007 PWM_MIN = 0.3 PWM_MAX = 0.0 -TEMPERATURE_THRESHOLD = 70.0 +TEMPERATURE_THRESHOLD = 80.0 ``` + ### Variables ```python @@ -106,6 +108,7 @@ FAST3 = Pin FAST4 = Pin ``` + ### Methods ```python diff --git a/docs/modules/big_motor.md b/docs/modules/big_motor.md index 97e291f..78b9f0b 100644 --- a/docs/modules/big_motor.md +++ b/docs/modules/big_motor.md @@ -69,12 +69,14 @@ Power can now be provided to all modules, by calling. yukon.enable_main_output() ``` + ## Using the Module ### Enabling its Driver With the `BigMotorModule` powered, its motor driver can be enabled or disabled by calling `.enable()` or `.disable()`. The state can also be queried by calling `.is_enabled()`. + ### Accessing the Motor The `BigMotorModule` class makes use of the [Motor Library](https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/modules/motor/README.md). @@ -131,6 +133,7 @@ For example, to read the current angle of the encoder, the following line of cod angle = module.encoder.degrees() ``` + #### Direct GPIO Access If your project does not need an encoder, then the pins on Big Motor + Encoder Module can be made available as GPIO. During creation of the `BigMotorModule`, instruct it to *not* create the encoder object, by providing it with the `init_encoder=False` parameter. Other encoder specific parameters, such as the PIO and SM, can also be omitted. @@ -160,12 +163,13 @@ NAME = "Big Motor + Encoder" NUM_MOTORS = 1 DEFAULT_FREQUENCY = 25000 DEFAULT_COUNTS_PER_REV = MMME_CPR # 12 -TEMPERATURE_THRESHOLD = 50.0 +TEMPERATURE_THRESHOLD = 80.0 CURRENT_THRESHOLD = 25.0 SHUNT_RESISTOR = 0.001 GAIN = 80 ``` + ### Variables ```python @@ -182,6 +186,7 @@ encoder: Encoder encoder_pins: tuple[Pin, Pin] ``` + ### Methods ```python diff --git a/docs/modules/dual_motor.md b/docs/modules/dual_motor.md index 76d759c..ab7959d 100644 --- a/docs/modules/dual_motor.md +++ b/docs/modules/dual_motor.md @@ -37,6 +37,7 @@ module = DualMotorModule(MOTOR_TYPE, FREQUENCY) ``` + ### Motor Types The `DualMotorModule` can drive both 2x brushed DC motors, or 1x bipolar stepper motor. The type of motor driven can be chosen using the following constants: @@ -73,6 +74,7 @@ Power can now be provided to all modules, by calling. yukon.enable_main_output() ``` + ## Using the Module ### Enabling its Driver @@ -169,9 +171,11 @@ The Dual Motor / Bipolar Stepper module features an onboard thermistor, letting Additionally, the fault state of the motor driver can be read by calling `.read_fault()`. This will be `False` during normal operation, but will switch to `True` under various conditions. For details of these conditions, check the [DRV8424P datasheet](https://www.ti.com/lit/ds/symlink/drv8424e.pdf). + ## References ### Constants + ```python NAME = "Dual Motor" DUAL = 0 @@ -198,6 +202,7 @@ DEFAULT_CURRENT_LIMIT = CURRENT_LIMIT_3 MAX_CURRENT_LIMIT = CURRENT_LIMIT_9 ``` + ### Variables ```python @@ -208,6 +213,7 @@ motors: list[Motor] motor_pins: tuple[tuple[Pin, Pin], tuple[Pin, Pin]] ``` + ### Functions ```python diff --git a/docs/modules/dual_output.md b/docs/modules/dual_output.md index 0c766d2..56c384f 100644 --- a/docs/modules/dual_output.md +++ b/docs/modules/dual_output.md @@ -14,7 +14,6 @@ This is the library reference for the [Dual Switched Output Module for Yukon](ht - [Functions](#functions) - ## Getting Started To start using a Dual Switched Output Module, you first need to import the class from `pimoroni_yukon.modules`. @@ -69,6 +68,7 @@ For convenience the constants `OUTPUT_1 = 0` and `OUTPUT_2 = 0` are provided. :information_source: **Enabling a switch does not produce an output on its own. Rather, it "unlocks" the switch to respond to commands.** + ### Accessing the Outputs The `DualOutputModule` class uses MicroPython's native [Pin class](https://docs.micropython.org/en/latest/library/machine.Pin.html) for its outputs. To Pin objects are created and made accessible through the `.outputs` list. @@ -108,6 +108,7 @@ NUM_OUTPUTS = 2 TEMPERATURE_THRESHOLD = 50.0 ``` + ### Variables ```python halt_on_not_pgood: bool @@ -115,6 +116,7 @@ halt_on_not_pgood: bool outputs: list[Pin] ``` + ### Functions ```python diff --git a/docs/modules/led_strip.md b/docs/modules/led_strip.md index 6afecc4..fd8c5ea 100644 --- a/docs/modules/led_strip.md +++ b/docs/modules/led_strip.md @@ -42,6 +42,7 @@ module = LEDStripModule(STRIP_TYPE, :warning: **Be sure to choose a PIO and State Machine that does not conflict with any others you have already set up.** + ### Strip Types Both WS2812's (aka NeoPixels) and APA102's (aka DotStars) are supported by the `LEDStripModule`. @@ -56,6 +57,7 @@ Strip types can accessed with the following constants: When using the `DUAL_NEOPIXEL` strip type, the lengths of the two strips can be provided as a tuple pair as the `LEDS_PER_STRIP` constant from the getting started section, or left as a single value if both strips are the same length. + ## Initialising the Module As with all Yukon modules, `LEDStripModule` must be initialised before it can be used. This is achieved by first registering the module with the `Yukon` class, with the slot it is attached to. @@ -82,12 +84,14 @@ Power can now be provided to all modules, by calling. yukon.enable_main_output() ``` + ## Using the Module ### Enabling its Output With the `LEDStripModule` powered, its output to the strip(s) can be enabled or disabled by calling `.enable()` or `.disable()`. The state can also be queried by calling `.is_enabled()`. + ### Accessing the LED Strip The `LEDStripModule` class makes use of the [Plasma Library](https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/modules/plasma/README.md). Depending on the strip type provided during creation, either an APA102 objects or WS2812 objects will be accessible through the variable `.strip`. @@ -103,6 +107,7 @@ module.strip.update() For the case of the `DUAL_NEOPIXEL` strip type, a `.strips` list is accessible containing two WS2812 objects, instead of a `.strip` variable. There are also `.strip1` and `.strip2` properties to make access to these strips easier. + ### Onboard Sensors The LED Strip module features an onboard thermistor, letting its temperature be monitored. This can be read by calling `.read_temperature()`. @@ -122,10 +127,12 @@ DOTSTAR = 2 STRIP_1 = 0 # Only for DUAL_NEOPIXEL strip_type STRIP_2 = 1 # Only for DUAL_NEOPIXEL strip_type NUM_STRIPS = 1 # Becomes 2 with the DUAL_NEOPIXEL strip_type -TEMPERATURE_THRESHOLD = 70.0 +TEMPERATURE_THRESHOLD = 80.0 ``` + ### Variables + ```python halt_on_not_pgood: bool @@ -136,6 +143,7 @@ strip: APA102 | WS2812 strips: list[WS2812] ``` + ### Functions ```python diff --git a/docs/modules/quad_servo_direct.md b/docs/modules/quad_servo_direct.md index a434440..8a98fe3 100644 --- a/docs/modules/quad_servo_direct.md +++ b/docs/modules/quad_servo_direct.md @@ -55,6 +55,7 @@ Power can now be provided to all modules, by calling. yukon.enable_main_output() ``` + ## Using the Module ### Accessing the Servos @@ -74,6 +75,7 @@ It is also possible to access the servos individually using the properties `.ser Up to four modules, for a total of 16 servos, can be used in this way, provided their PWM pins do not conflict. Refer to the [Yukon Pinout Diagram](../yukon_pinout_diagram.png) for the slots you are using. + #### More than 16 Servos To drive more than 16 servos, or use slots that would normally have conflicting PWMs, a [ServoCluster](https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/modules/servo/README.md#servocluster) object should to be used. @@ -123,6 +125,7 @@ SERVO_4 = 3 NUM_SERVOS = 4 ``` + ### Variables ```python # If init_servos was True @@ -132,6 +135,7 @@ servos: list[Servo] servo_pins: tuple[Pin, Pin, Pin, Pin] ``` + ### Functions ```python diff --git a/docs/modules/quad_servo_reg.md b/docs/modules/quad_servo_reg.md index 141dbb5..75c22b6 100644 --- a/docs/modules/quad_servo_reg.md +++ b/docs/modules/quad_servo_reg.md @@ -15,7 +15,6 @@ This is the library reference for the [Quad Servo Regulated Module for Yukon](ht - [Functions](#functions) - ## Getting Started To start using a Quad Servo Regulated Module, you first need to import the class from `pimoroni_yukon.modules`. @@ -57,12 +56,14 @@ Power can now be provided to all modules, by calling. yukon.enable_main_output() ``` + ## Using the Module ### Enabling its Output With the `QuadServoRegModule` powered, its output to the servos can be enabled or disabled by calling `.enable()` or `.disable()`. The state can also be queried by calling `.is_enabled()`. + ### Accessing the Servos The `QuadServoRegModule` class makes use of the [Servo Library](https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/modules/servo/README.md). @@ -80,6 +81,7 @@ It is also possible to access the servos individually using the properties `.ser Up to four modules, for a total of 16 servos, can be used in this way, provided their PWM pins do not conflict. Refer to the [Yukon Pinout Diagram](../yukon_pinout_diagram.png) for the slots you are using. + #### More than 16 Servos To drive more than 16 servos, or use slots that would normally have conflicting PWMs, a [ServoCluster](https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/modules/servo/README.md#servocluster) object should to be used. @@ -127,9 +129,10 @@ SERVO_2 = 1 SERVO_3 = 2 SERVO_4 = 3 NUM_SERVOS = 4 -TEMPERATURE_THRESHOLD = 70.0 +TEMPERATURE_THRESHOLD = 80.0 ``` + ### Variables ```python halt_on_not_pgood: bool @@ -141,6 +144,7 @@ servos: list[Servo] servo_pins: tuple[Pin, Pin, Pin, Pin] ``` + ### Functions ```python @@ -178,4 +182,4 @@ monitor() -> None get_readings() -> OrderedDict process_readings() -> None clear_readings() -> None -``` \ No newline at end of file +```