From 7ec984165602a57c17e3d7a3af6a451d1f3533c1 Mon Sep 17 00:00:00 2001 From: ZodiusInfuser Date: Fri, 20 Oct 2023 12:02:45 +0100 Subject: [PATCH] Updates to readme's --- README.md | 69 +++++-- docs/README.md | 406 +------------------------------------- docs/audio_amp.md | 57 ++++++ docs/bench_power.md | 61 ++++++ docs/big_motor.md | 52 +++++ docs/dual_motor.md | 59 ++++++ docs/dual_output.md | 50 +++++ docs/led_strip.md | 52 +++++ docs/quad_servo_direct.md | 41 ++++ docs/quad_servo_reg.md | 55 ++++++ docs/serial_servo.md | 3 + 11 files changed, 481 insertions(+), 424 deletions(-) create mode 100644 docs/audio_amp.md create mode 100644 docs/bench_power.md create mode 100644 docs/big_motor.md create mode 100644 docs/dual_motor.md create mode 100644 docs/dual_output.md create mode 100644 docs/led_strip.md create mode 100644 docs/quad_servo_direct.md create mode 100644 docs/quad_servo_reg.md create mode 100644 docs/serial_servo.md diff --git a/README.md b/README.md index 11cee02..b6a3ffc 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,74 @@ # Pimoroni Yukon -## Firmware, Examples & Documentation -Yukon is a high power modular robotics / engineering platform, powered by the Raspberry Pi RP2040. Learn more - https://shop.pimoroni.com/products/yukon +This repository is home to the MicroPython build, library, and examples for Pimoroni Yukon. -- [Install](#install) - - [Flashing the Firmware](#flashing-the-firmware) -- [Examples and Usage](#examples-and-usage) +[![Build Status](https://img.shields.io/github/actions/workflow/status/pimoroni/yukon/micropython.yml?branch=main&label=MicroPython)](https://github.com/pimoroni/yukon/actions/workflows/micropython.yml) +[![GitHub release (latest by date)](https://img.shields.io/github/v/release/pimoroni/yukon)](https://github.com/pimoroni/picovision/releases/latest/) +- [Introduction](#introduction) +- [Download MicroPython](#download-micropython) + - [Regular](#regular) + - [With Filesystem](#with-filesystem) +- [Flashing the Firmware](#flashing-the-firmware) +- [Examples](#examples) +- [Documentation](#documentation) -## Install + +## Introduction + +Yukon is a high-power modular robotics and engineering platform, able to drive your most ambitious of robots, props or contraptions! + +Powered by the RP2040, Yukon leverages the chip's unique pin capabilities to offer six slots for attaching a range of interchangeable hardware modules for driving high-powered devices. This lets you control motors, servos, steppers, speakers, LED strips, and more, all from a single board! + +Customise Yukon to suit almost any project, or started with a few modules and expand as a project grows. There is also a proto module for adding more features! Each module is screwed down to ensure a solid mechanical and electrical connection. + +* :link: [Buy a Yukon here](https://shop.pimoroni.com/products/yukon) + +## Download MicroPython Grab the latest release from [https://github.com/pimoroni/yukon/releases/latest](https://github.com/pimoroni/yukon/releases/latest) -There are two .uf2 files to pick from. +There are two .uf2 files to pick from: + +### Regular + +* `pimoroni-yukon-vX.X.X-micropython.uf2` + +This build includes only the firmware needed for Yukon to function, and leaves your files alone. You will need to manually update the `lib/pimoroni_yukon` library afterwards to get the latest features and bug fixes. + + +### With Filesystem + +:warning: **This option will overwrite the entire contents of your Yukon! Be sure to back up files to your PC before installing!** + +* `pimoroni-yukon-vX.X.X-micropython-with-filesystem.uf2 ` -:warning: Those marked `with-filesystem` contain a full filesystem image that will overwrite both the firmware *and* filesystem of your Yukon: +This build contains both the firmware for Yukon and the library files needed to take full advantage of the hardware. -* pimoroni-yukon-vX.X.X-micropython-with-filesystem.uf2 +## Flashing the Firmware -The regular builds just include the firmware, and leave your files alone: +1. Connect Yukon to your computer using a USB A to C cable. -* pimoroni-yukon-vX.X.X-micropython.uf2 +2. Turn off your board by pressing the PWR button. The green light should turn off. +3. Put your board into bootloader mode by holding the BOOT/USER button whilst pressing the PWR button to turn the board on. The green light should turn on, and the lights next to the A and B buttons should have a dim glow. -### Flashing the Firmware +4. Drag and drop one of the `pimoroni-yukon-vX.X.X...` .uf2 files to the "RPI-RP2" drive that appears. -1. Connect your Yukon to your computer using a USB A to C cable. +5. After the copy completes your board should reset and, if you used the `with-filesystem` variant, should start playing a flashing pattern on the A and B LEDs. -2. Turn off your board by pressing the PWM button. The green light should turn off. +:information_source: **Overwriting Yukon's filesystem can take multiple minutes to complete.** -3. Put your device into bootloader mode by holding the BOOT/USER button whilst pressing the PWR button to turn the board on. The green light should turn on, and the lights next to the A and B buttons should have a dim glow. -4. Drag and drop one of the `yukon` .uf2 files to the "RPI-RP2" drive that appears. +## Examples -5. Your device should reset and, if you used the `with-filesystem` variant, should see the A and B lights flash in a repeated pattern. +There are many examples to get you started with Yukon, located in the examples folder of this repository. Details about what each one does can be found in their respective sections: +* [Examples: Board](/examples/board/README.md) +* [Examples: Modules](/examples/modules/README.md) +* [Examples: Showcase](/examples/showcase/README.md) -## Examples and Usage -There are many examples to get you started with Yukon, located in the examples folder of this repository. Details about what each one does can be found in the [examples readme](/examples/README.md). +## Documentation To take Yukon further, the full API is described in the [documentation readme](/docs/README.md) diff --git a/docs/README.md b/docs/README.md index 7893e93..30481e2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ # Yukon - Library Reference -This is the library reference for the [Pimoroni Yukon](https://pimoroni.com/yukon), a high-powered modular robotics / engineering platform, powered by the Raspberry Pi RP2040. +This is the library reference for the [Pimoroni Yukon](https://pimoroni.com/yukon), a high-powered modular robotics and engineering platform, powered by the Raspberry Pi RP2040. ## Table of Content @@ -15,37 +15,6 @@ This is the library reference for the [Pimoroni Yukon](https://pimoroni.com/yuko - [Constants](#constants) - [Methods](#methods) - [Yukon Module](#yukon-module) - - [Audio Amp Module](#audio-amp-module) - - [Constants](#constants-1) - - [Variables \& Properties](#variables--properties) - - [Methods](#methods-1) - - [Bench Power Module](#bench-power-module) - - [Constants](#constants-2) - - [Variables \& Properties](#variables--properties-1) - - [Methods](#methods-2) - - [Big Motor Module](#big-motor-module) - - [Constants](#constants-3) - - [Variables \& Properties](#variables--properties-2) - - [Methods](#methods-3) - - [Dual Motor Module](#dual-motor-module) - - [Constants](#constants-4) - - [Variables \& Properties](#variables--properties-3) - - [Method](#method) - - [Dual Switched Module](#dual-switched-module) - - [Constants](#constants-5) - - [Variables \& Properties](#variables--properties-4) - - [LED Strip Module](#led-strip-module) - - [Constants](#constants-6) - - [Variables \& Properties](#variables--properties-5) - - [Methods](#methods-4) - - [Quad Servo Direct Module](#quad-servo-direct-module) - - [Constants](#constants-7) - - [Variables \& Properties](#variables--properties-6) - - [Methods](#methods-5) - - [Quad Servo Reg Module](#quad-servo-reg-module) - - [Constants](#constants-8) - - [Variables \& Properties](#variables--properties-7) - - [Methods](#methods-6) - [Constants Reference](#constants-reference) - [Slot Constants](#slot-constants) - [Sensor Addresses](#sensor-addresses) @@ -298,379 +267,6 @@ process_readings() -> None clear_readings() -> None ``` -### Audio Amp Module - -#### Constants -```python -NAME = "Audio Amp" -AMP_I2C_ADDRESS = 0x38 -TEMPERATURE_THRESHOLD = 50.0 -``` - -#### Variables & Properties -```python -I2S_DATA : SLOT -I2S_CLK : SLOT -I2S_FS : SLOT -``` - -#### Methods -```python -## Address Checking ## -@staticmethod -is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool - -## Initialisation ## -AudioAmpModule() -initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None -reset() -> None - -## Power Control ## -enable() -> None -disable() -> None -is_enabled() -> bool - -## Output Control ## -exit_soft_shutdown() -> None -set_volume(volume : float) -> None - -## Sensing ## -read_temperature() -> float - -## Monitoring ## -monitor() -> None -get_readings() -> OrderedDict -process_readings() -> None -clear_readings() -> None - -## Soft I2C ## -write_i2c_reg(register : int, data : int) -> None -read_i2c_reg(register : int) -> int -detect_i2c() -> int -``` - -### Bench Power Module - -#### Constants -```python -NAME = "Bench Power" - -VOLTAGE_MAX = 12.3953 -VOLTAGE_MID = 6.5052 -VOLTAGE_MIN = 0.6713 -VOLTAGE_MIN_MEASURE = 0.1477 -VOLTAGE_MID_MEASURE = 1.1706 -VOLTAGE_MAX_MEASURE = 2.2007 -PWM_MIN = 0.3 -PWM_MAX = 0.0 - -TEMPERATURE_THRESHOLD = 50.0 -``` - -#### Variables & Properties -```python -halt_on_not_pgood : bool -``` - -#### Methods -```python -## Address Checking ## -@staticmethod -is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool - -## Initialisation ## -BenchPowerModule(halt_on_not_pgood=False : bool) -initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None -reset() -> None - -## Power Control -enable() -> None -disable() -> None -is_enabled() -> bool - -## Output Control ## -set_target_voltage(voltage : float) -> None -set_target(percent : float) -> None - -## Sensing ## -read_voltage() -> float -read_power_good() -> bool -read_temperature() -> float - -## Monitoring ## -monitor() -> None -get_readings() -> OrderedDict -process_readings() -> None -clear_readings() -> None -``` - -### Big Motor Module - -#### Constants -```python -NAME = "Big Motor + Encoder" -NUM_MOTORS = 1 -DEFAULT_FREQUENCY = 25000 -TEMPERATURE_THRESHOLD = 50.0 -CURRENT_THRESHOLD = 25.0 -SHUNT_RESISTOR = 0.001 -GAIN = 80 -``` - -#### Variables & Properties -```python -motor : Motor -``` - -#### Methods -```python -## Address Checking ## -@staticmethod -is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool - -## Initialisation ## -BigMotorModule(frequency=DEFAULT_FREQUENCY : float) -initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None -reset() -> None - -## Power Control ## -enable() -> None -disable() -> None -is_enabled() -> bool - -## Sensing ## -read_fault() -> bool -read_current() -> float -read_temperature() -> float - -## Monitoring ## -monitor() -> None -get_readings() -> OrderedDict -process_readings() -> None -clear_readings() -> None -``` - -### Dual Motor Module - -#### Constants -```python -NAME = "Dual Motor" -DUAL = 0 -STEPPER = 1 -NUM_MOTORS = 2 -NUM_STEPPERS = 1 -FAULT_THRESHOLD = 0.1 -DEFAULT_FREQUENCY = 25000 -TEMPERATURE_THRESHOLD = 50.0 -``` - -#### Variables & Properties -```python -motors : list[Motor] -motor1 -> Motor -motor2 -> Motor -stepper : Stepper -``` - -#### Method -```python -## Address Checking ## -@staticmethod -is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool - -## Initialisation ## -DualMotorModule(motor_type=DUAL : int, - frequency=DEFAULT_FREQUENCY : float) -initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None -reset() -> None - -## Power Control ## -enable() -> None -disable() -> None -is_enabled() -> bool - -## Output Control ## -... - -## Sensing -read_fault() -> bool -read_temperature() -> float - -## Monitoring ## -monitor() -> None -get_readings() -> OrderedDict -process_readings() -> None -clear_readings() -> None -``` - -### Dual Switched Module - -#### Constants -```python -NAME = "Dual Switched Output" -NUM_OUTPUTS = 2 -TEMPERATURE_THRESHOLD = 50.0 -``` - -#### Variables & Properties -```python -halt_on_not_pgood : bool -``` - -```python -## Address Checking ## -@staticmethod -is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool - -## Initialisation ## -DualOutputModule(halt_on_not_pgood=False : bool) -initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None -reset() -> None - -## Power Control ## -enable() -> None -disable() -> None -is_enabled() -> bool - -## Output Control -output(switch : int, value : bool) -> None -read_output(switch : int) -> bool - -## Sensing ## -read_power_good(switch : int) -> bool -read_temperature() -> float - -## Monitoring ## -monitor() -> None -get_readings() -> OrderedDict -process_readings() -> None -clear_readings() -> None -``` - -### LED Strip Module - -#### Constants -```python -NAME = "LED Strip" -NEOPIXEL = 0 -DOTSTAR = 1 -TEMPERATURE_THRESHOLD = 50.0 -``` - -#### Variables & Properties -```python -halt_on_not_pgood -> bool -``` - -#### Methods -```python -## Address Checking ## -@staticmethod -is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool - -## Initialisation ## -LEDStripModule(strip_type : int, num_pixels : int, brightness=1.0 : float, halt_on_not_pgood=False : bool) -initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None -reset() -> None - -## Misc ## -count() -> int - -## Power Control -enable() -> None -disable() -> None -is_enabled() -> bool - -## Sensing ## -read_power_good() -> bool -read_temperature() -> float - -## Monitoring ## -monitor() -> None -get_readings() -> OrderedDict -process_readings() -> None -clear_readings() -> None -``` - -### Quad Servo Direct Module - -#### Constants -```python -NAME = "Quad Servo Direct" -NUM_SERVOS = 4 -``` - -#### Variables & Properties -```python -servos : list[Servo] -servo1 -> Servo -servo2 -> Servo -servo3 -> Servo -servo4 -> Servo -``` - -#### Methods -```python -## Address Checking ## -@staticmethod -is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool - -## Initialisation ## -QuadServoDirect() -initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None -reset() -> None - -## Sensing ## -read_adc1() -> float -read_adc2() -> float -``` - -### Quad Servo Reg Module - -#### Constants -```python -NAME = "Quad Servo Direct" -NUM_SERVOS = 4 -``` - -#### Variables & Properties -```python -halt_on_not_pgood : bool -servos : list[Servo] -servo1 -> Servo -servo2 -> Servo -servo3 -> Servo -servo4 -> Servo -``` - -#### Methods -```python -## Address Checking ## -@staticmethod -is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool - -## Initialisation ## -QuadServoRegModule(halt_on_not_pgood=False : bool) -initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None -reset() -> None - -## Power Control ## -enable() -> None -disable() -> None -is_enabled() -> bool - -## Sensing ## -read_power_good() -> bool -read_temperature() -> float - -## Monitoring ## -monitor() -> None -get_readings() -> OrderedDict -process_readings() -> None -clear_readings() -> None -``` - - ## Constants Reference diff --git a/docs/audio_amp.md b/docs/audio_amp.md new file mode 100644 index 0000000..1c25ead --- /dev/null +++ b/docs/audio_amp.md @@ -0,0 +1,57 @@ +# Audio Amp Module - Library Reference + +This is the library reference for the [Audio Amp Module for Yukon](https://pimoroni.com/yukon). + +- [Constants](#constants) +- [Variables \& Properties](#variables--properties) +- [Methods](#methods) + + +## Constants +```python +NAME = "Audio Amp" +AMP_I2C_ADDRESS = 0x38 +TEMPERATURE_THRESHOLD = 50.0 +``` + +## Variables & Properties +```python +I2S_DATA : SLOT +I2S_CLK : SLOT +I2S_FS : SLOT +``` + +## Methods +```python +## Address Checking ## +@staticmethod +is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool + +## Initialisation ## +AudioAmpModule() +initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None +reset() -> None + +## Power Control ## +enable() -> None +disable() -> None +is_enabled() -> bool + +## Output Control ## +exit_soft_shutdown() -> None +set_volume(volume : float) -> None + +## Sensing ## +read_temperature() -> float + +## Monitoring ## +monitor() -> None +get_readings() -> OrderedDict +process_readings() -> None +clear_readings() -> None + +## Soft I2C ## +write_i2c_reg(register : int, data : int) -> None +read_i2c_reg(register : int) -> int +detect_i2c() -> int +``` diff --git a/docs/bench_power.md b/docs/bench_power.md new file mode 100644 index 0000000..0e8d87c --- /dev/null +++ b/docs/bench_power.md @@ -0,0 +1,61 @@ +# Bench Power Module - Library Reference + +This is the library reference for the [Bench Power Module for Yukon](https://pimoroni.com/yukon). + +- [Constants](#constants) +- [Variables \& Properties](#variables--properties) +- [Methods](#methods) + + +#### Constants +```python +NAME = "Bench Power" + +VOLTAGE_MAX = 12.3953 +VOLTAGE_MID = 6.5052 +VOLTAGE_MIN = 0.6713 +VOLTAGE_MIN_MEASURE = 0.1477 +VOLTAGE_MID_MEASURE = 1.1706 +VOLTAGE_MAX_MEASURE = 2.2007 +PWM_MIN = 0.3 +PWM_MAX = 0.0 + +TEMPERATURE_THRESHOLD = 50.0 +``` + +#### Variables & Properties +```python +halt_on_not_pgood : bool +``` + +#### Methods +```python +## Address Checking ## +@staticmethod +is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool + +## Initialisation ## +BenchPowerModule(halt_on_not_pgood=False : bool) +initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None +reset() -> None + +## Power Control +enable() -> None +disable() -> None +is_enabled() -> bool + +## Output Control ## +set_target_voltage(voltage : float) -> None +set_target(percent : float) -> None + +## Sensing ## +read_voltage() -> float +read_power_good() -> bool +read_temperature() -> float + +## Monitoring ## +monitor() -> None +get_readings() -> OrderedDict +process_readings() -> None +clear_readings() -> None +``` \ No newline at end of file diff --git a/docs/big_motor.md b/docs/big_motor.md new file mode 100644 index 0000000..bfa4d70 --- /dev/null +++ b/docs/big_motor.md @@ -0,0 +1,52 @@ +### Big Motor Module - Library Reference + +This is the library reference for the [Big Motor + Encoder Module for Yukon](https://pimoroni.com/yukon). + +- [Constants](#constants) +- [Variables \& Properties](#variables--properties) +- [Methods](#methods) + + +#### Constants +```python +NAME = "Big Motor + Encoder" +NUM_MOTORS = 1 +DEFAULT_FREQUENCY = 25000 +TEMPERATURE_THRESHOLD = 50.0 +CURRENT_THRESHOLD = 25.0 +SHUNT_RESISTOR = 0.001 +GAIN = 80 +``` + +#### Variables & Properties +```python +motor : Motor +``` + +#### Methods +```python +## Address Checking ## +@staticmethod +is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool + +## Initialisation ## +BigMotorModule(frequency=DEFAULT_FREQUENCY : float) +initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None +reset() -> None + +## Power Control ## +enable() -> None +disable() -> None +is_enabled() -> bool + +## Sensing ## +read_fault() -> bool +read_current() -> float +read_temperature() -> float + +## Monitoring ## +monitor() -> None +get_readings() -> OrderedDict +process_readings() -> None +clear_readings() -> None +``` \ No newline at end of file diff --git a/docs/dual_motor.md b/docs/dual_motor.md new file mode 100644 index 0000000..a0ca7af --- /dev/null +++ b/docs/dual_motor.md @@ -0,0 +1,59 @@ +### Dual Motor / Bipolar Stepper Module - Library Reference + +This is the library reference for the [Dual Motor / Bipolar Stepper Module for Yukon](https://pimoroni.com/yukon). + +- [Constants](#constants) +- [Variables \& Properties](#variables--properties) +- [Method](#method) + + +#### Constants +```python +NAME = "Dual Motor" +DUAL = 0 +STEPPER = 1 +NUM_MOTORS = 2 +NUM_STEPPERS = 1 +FAULT_THRESHOLD = 0.1 +DEFAULT_FREQUENCY = 25000 +TEMPERATURE_THRESHOLD = 50.0 +``` + +#### Variables & Properties +```python +motors : list[Motor] +motor1 -> Motor +motor2 -> Motor +stepper : Stepper +``` + +#### Method +```python +## Address Checking ## +@staticmethod +is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool + +## Initialisation ## +DualMotorModule(motor_type=DUAL : int, + frequency=DEFAULT_FREQUENCY : float) +initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None +reset() -> None + +## Power Control ## +enable() -> None +disable() -> None +is_enabled() -> bool + +## Output Control ## +... + +## Sensing +read_fault() -> bool +read_temperature() -> float + +## Monitoring ## +monitor() -> None +get_readings() -> OrderedDict +process_readings() -> None +clear_readings() -> None +``` \ No newline at end of file diff --git a/docs/dual_output.md b/docs/dual_output.md new file mode 100644 index 0000000..4c7b62a --- /dev/null +++ b/docs/dual_output.md @@ -0,0 +1,50 @@ +### Dual Switched Output Module - Library Reference + +This is the library reference for the [Dual Switched Output Module for Yukon](https://pimoroni.com/yukon). + +- [Constants](#constants) +- [Variables \& Properties](#variables--properties) + + + +#### Constants +```python +NAME = "Dual Switched Output" +NUM_OUTPUTS = 2 +TEMPERATURE_THRESHOLD = 50.0 +``` + +#### Variables & Properties +```python +halt_on_not_pgood : bool +``` + +```python +## Address Checking ## +@staticmethod +is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool + +## Initialisation ## +DualOutputModule(halt_on_not_pgood=False : bool) +initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None +reset() -> None + +## Power Control ## +enable() -> None +disable() -> None +is_enabled() -> bool + +## Output Control +output(switch : int, value : bool) -> None +read_output(switch : int) -> bool + +## Sensing ## +read_power_good(switch : int) -> bool +read_temperature() -> float + +## Monitoring ## +monitor() -> None +get_readings() -> OrderedDict +process_readings() -> None +clear_readings() -> None +``` diff --git a/docs/led_strip.md b/docs/led_strip.md new file mode 100644 index 0000000..ed698d0 --- /dev/null +++ b/docs/led_strip.md @@ -0,0 +1,52 @@ +### LED Strip Module - Library Reference + +This is the library reference for the [LED Strip Module for Yukon](https://pimoroni.com/yukon). + +- [Constants](#constants) +- [Variables \& Properties](#variables--properties) +- [Methods](#methods) + + + +#### Constants +```python +NAME = "LED Strip" +NEOPIXEL = 0 +DOTSTAR = 1 +TEMPERATURE_THRESHOLD = 50.0 +``` + +#### Variables & Properties +```python +halt_on_not_pgood -> bool +``` + +#### Methods +```python +## Address Checking ## +@staticmethod +is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool + +## Initialisation ## +LEDStripModule(strip_type : int, num_pixels : int, brightness=1.0 : float, halt_on_not_pgood=False : bool) +initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None +reset() -> None + +## Misc ## +count() -> int + +## Power Control +enable() -> None +disable() -> None +is_enabled() -> bool + +## Sensing ## +read_power_good() -> bool +read_temperature() -> float + +## Monitoring ## +monitor() -> None +get_readings() -> OrderedDict +process_readings() -> None +clear_readings() -> None +``` \ No newline at end of file diff --git a/docs/quad_servo_direct.md b/docs/quad_servo_direct.md new file mode 100644 index 0000000..3f6544d --- /dev/null +++ b/docs/quad_servo_direct.md @@ -0,0 +1,41 @@ +### Quad Servo Direct Module - Library Reference + +This is the library reference for the [Quad Servo Direct Module for Yukon](https://pimoroni.com/yukon). + +- [Constants](#constants) +- [Variables \& Properties](#variables--properties) +- [Methods](#methods) + + + +#### Constants +```python +NAME = "Quad Servo Direct" +NUM_SERVOS = 4 +``` + +#### Variables & Properties +```python +servos : list[Servo] +servo1 -> Servo +servo2 -> Servo +servo3 -> Servo +servo4 -> Servo +``` + +#### Methods +```python +## Address Checking ## +@staticmethod +is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool + +## Initialisation ## +QuadServoDirect() +initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None +reset() -> None + +## Sensing ## +read_adc1() -> float +read_adc2() -> float +``` + diff --git a/docs/quad_servo_reg.md b/docs/quad_servo_reg.md new file mode 100644 index 0000000..3a127a1 --- /dev/null +++ b/docs/quad_servo_reg.md @@ -0,0 +1,55 @@ +### Quad Servo Regulated Module - Library Reference + +This is the library reference for the [Quad Servo Regulated Module for Yukon](https://pimoroni.com/yukon). + +- [Constants](#constants) +- [Variables \& Properties](#variables--properties) +- [Methods](#methods) + + + +#### Constants +```python +NAME = "Quad Servo Direct" +NUM_SERVOS = 4 +``` + +#### Variables & Properties +```python +halt_on_not_pgood : bool +servos : list[Servo] +servo1 -> Servo +servo2 -> Servo +servo3 -> Servo +servo4 -> Servo +``` + + + + +#### Methods +```python +## Address Checking ## +@staticmethod +is_module(adc1_level : int, adc2_level : int, slow1 : bool, slow2 : bool, slow3 :bool) -> bool + +## Initialisation ## +QuadServoRegModule(halt_on_not_pgood=False : bool) +initialise(slot : SLOT, adc1_func : Any, adc2_func : Any) -> None +reset() -> None + +## Power Control ## +enable() -> None +disable() -> None +is_enabled() -> bool + +## Sensing ## +read_power_good() -> bool +read_temperature() -> float + +## Monitoring ## +monitor() -> None +get_readings() -> OrderedDict +process_readings() -> None +clear_readings() -> None +``` \ No newline at end of file diff --git a/docs/serial_servo.md b/docs/serial_servo.md new file mode 100644 index 0000000..4bf7ea3 --- /dev/null +++ b/docs/serial_servo.md @@ -0,0 +1,3 @@ + Serial Bus Servo Module - Library Reference + +This is the library reference for the [Serial Bus Servo Module for Yukon](https://pimoroni.com/yukon).