335f2cc9fb9fbc7ab6e8d0f97c2ab9a34f113943
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.
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 commandled.py= sends led command which sends led fade trackposition.py= sends position command and returns the current positionreset_offset.py= sends reset_offset commandtrack.py {track name}= reads a thetarho file and sends polar coordinates line by line
Description
Languages
C
56%
Python
26.9%
C++
16.7%
CMake
0.4%