Your Name a64a00b3fd Second
2026-08-08 16:04:31 +03:00
2026-08-08 15:51:33 +03:00
2026-08-08 15:51:33 +03:00
2026-08-08 15:51:33 +03:00
2026-08-08 15:51:33 +03:00
2026-08-08 15:51:33 +03:00
2026-08-08 15:51:33 +03:00
2026-08-08 15:51:33 +03:00
2026-08-08 15:51:33 +03:00
2026-08-08 15:51:33 +03:00
2026-08-08 16:04:31 +03:00

Zephyr Sand Table firmware

This repository contains the implementation of Sand Table firmware for the Zephyr RTOS.

The firmware controls 2x stepper motors and RGBW LED strip.

BUILD

west build -p -b arduino_nano_connect

ACK

Every command returns either an ACK or NACK.

Homing, Step, and Polar commands return separate ACK when the arms are done moving.

Command Structure

struct command_message_t {
    uint8_t prefix;     // 0x69
    uint8_t length;		// Length of the data
    uint8_t id;			// 0x00
    uint8_t command;
    uint8_t crc;
    uint8_t data[160];
} __attribute__((packed));

Commands

typedef enum {
	COMMAND_ACK,
	COMMAND_NACK,
	COMMAND_LED,
	COMMAND_HOME,
	COMMAND_DISABLE_MOTORS,
	COMMAND_MOTOR_STEP,
	COMMAND_MOTOR_SPEED,
	COMMAND_POLAR,
	COMMAND_GET_POLAR,
	COMMAND_SET_OFFSET,
	COMMAND_RESET_OFFSET,
} commands_e;

Python test scripts (AI generated)

  • home.py = sends homing command
  • led.py = sends led command which sends led fade track
  • position.py = sends position command and returns the current position
  • reset_offset.py = sends reset_offset command
  • track.py {track name} = reads a thetarho file and sends polar coordinates line by line
S
Description
Zephyr firmware for the RP2040 in the SandTable project
Readme 498 KiB
Languages
C 56%
Python 26.9%
C++ 16.7%
CMake 0.4%