minor changes

This commit is contained in:
Your Name
2026-06-17 13:07:58 +03:00
parent 8d5af0b70c
commit 26f3263a05
33 changed files with 935 additions and 508 deletions
+39 -1
View File
@@ -1,3 +1,41 @@
# servo2350
Custom PCB with RP2350. Mainly used for hexapods and driving servo motors.
Custom PCB with RP2350. Mainly used for hexapods and driving 18x servo motors with 18x ADC feedback through multiplexer.
![image](datasheets/board.jpg)
## Specs
* **CPU:** RP2350B with debug pins
* **FLASH:** W25Q16JVUXIQ_TR 16Mbit NOR quad SPI memory
* **OUTPUT:** 18x PWM, 6x digital output (3 pin header), 2x LEDs, extra pins in header
* **INPUT:** 18x ADC though a CD74HC4067 multiplexer
* **SENSORS:** ICM-45686 IMU
* **SERIAL:** SPI, I2C, USB, UART
## Test code 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> <on\|off>` | `id`: `0-1` | Set LED state |
| `led allon` | - | Turn all LEDs ON |
| `led alloff` | - | Turn all LEDs OFF |
| `servo set <id> <angle>` | Servo ID, angle in degrees | Set servo angle |
| `adc read <id>` | ADC channel ID | Read a single ADC channel |
| `adc read_for <id> <count>` | ADC channel ID, sample count | Read one ADC channel repeatedly |
| `adc scan` | - | Read all ADC channels once |
| `adc scan_for <count>` | `count ≤ 1024` | Read all ADC channels repeatedly and log timestamps |
### UART Output Formats
| Command | Output Format |
| -------------- | --------------------------------------------------- |
| `adc scan` | `ADC,<channel>,<value>` |
| `adc scan_for` | `<sample>,ADC,<channel>,<value>,<timestamp_cycles>` |