From dfabdd5003014de5e27172fcdcea9bc298acbd0d Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 25 Jun 2026 13:59:53 +0300 Subject: [PATCH] Update readme --- README.md | 29 +++-------------------------- test_code/README.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 26 deletions(-) create mode 100644 test_code/README.md diff --git a/README.md b/README.md index 7cf8687..5ed5aaa 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # servo2350 -Custom PCB with RP2350. Mainly used for hexapods and driving 18x servo motors with 18x ADC feedback through multiplexer. +Custom PCB with RP2350. Mainly used for hexapods and driving 18x servo motors with 18x ADC feedback through multiplexer. The project uses mainly 0402 components for extra challenge. ![image](datasheets/board.jpg) @@ -13,29 +13,6 @@ Custom PCB with RP2350. Mainly used for hexapods and driving 18x servo motors wi * **SENSORS:** ICM-45686 IMU * **SERIAL:** SPI, I2C, USB, UART -## Test code commands +## Test code -> [!WARNING] -> The zephyr sdk has bug in the [rp2350 pinctrl](https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/dt-bindings/pinctrl/rpi-pico-rp2350-pinctrl-common.h) file. The `RP2_PINCTRL_GPIO_FUNC_UART_AUX` macro is defind, but `RP2_PINCTRL_GPIO_FUNC_UART_ALT` macro is used. - -> [!NOTE] -> While shell is over USB, the `adc scan_for` command uses uart. The UART uses spi1 pins, so the spi1 needs to be disabled and `extra_uart.overlay` needs to be used. - - -| Command | Parameters | Description | -| --------------------------- | ---------------------------- | --------------------------------------------------- | -| `led set ` | `id`: `0-1` | Set LED state | -| `led allon` | - | Turn all LEDs ON | -| `led alloff` | - | Turn all LEDs OFF | -| `servo set ` | Servo ID, angle in degrees | Set servo angle | -| `adc read ` | ADC channel ID | Read a single ADC channel | -| `adc read_for ` | ADC channel ID, sample count | Read one ADC channel repeatedly | -| `adc scan` | - | Read all ADC channels once | -| `adc scan_for ` | `count ≤ 1024` | Read all ADC channels repeatedly and log timestamps | - -### UART Output Formats - -| Command | Output Format | -| -------------- | --------------------------------------------------- | -| `adc scan` | `ADC,,` | -| `adc scan_for` | `,ADC,,,` | +The peripheral test code and example can be found in [test_code](test_code). \ No newline at end of file diff --git a/test_code/README.md b/test_code/README.md new file mode 100644 index 0000000..7de3849 --- /dev/null +++ b/test_code/README.md @@ -0,0 +1,30 @@ +# Test code + +Testing peripherals on the custom RP2350B servo controller PCB. + +## Commands + +> [!WARNING] +> The zephyr sdk has bug in the [rp2350 pinctrl](https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/dt-bindings/pinctrl/rpi-pico-rp2350-pinctrl-common.h) file. The `RP2_PINCTRL_GPIO_FUNC_UART_AUX` macro is defind, but `RP2_PINCTRL_GPIO_FUNC_UART_ALT` macro is used. + +> [!NOTE] +> While shell is over USB, the `adc scan_for` command uses uart. The UART uses spi1 pins, so the spi1 needs to be disabled and `extra_uart.overlay` needs to be used. + + +| Command | Parameters | Description | +| --------------------------- | ---------------------------- | --------------------------------------------------- | +| `led set ` | `id`: `0-1` | Set LED state | +| `led allon` | - | Turn all LEDs ON | +| `led alloff` | - | Turn all LEDs OFF | +| `servo set ` | Servo ID, angle in degrees | Set servo angle | +| `adc read ` | ADC channel ID | Read a single ADC channel | +| `adc read_for ` | ADC channel ID, sample count | Read one ADC channel repeatedly | +| `adc scan` | - | Read all ADC channels once | +| `adc scan_for ` | `count ≤ 1024` | Read all ADC channels repeatedly and log timestamps | + +### UART Output Formats + +| Command | Output Format | +| -------------- | --------------------------------------------------- | +| `adc scan` | `ADC,,` | +| `adc scan_for` | `,ADC,,,` |