AGKireev robot_ui .cursorrules file for TypeScript

This is a UI for a hexapod robot.
It is written in ReactJS, TypeScript, Vite and Bootstrap.

1. The robot is:
   Adeept RaspClaws hexapod robot with the following components:

- Raspberry Pi 5 (8GB)
- Camera Module 3 (IMX708)
- Servos:
  12 leg servos (6 legs × 2 servos each)
  2 camera servos (pan/tilt)
- Uses PCA9685 PWM controller
- Lighting:
  WS281x LED strip (16 LEDs)

2. The UI sends commands to the robot (a backend) via a websocket connection. It also displays the robot's status and video feed.

3. Description of servos which this robot has
   a. Legs scheme:
   left_I -<forward>-- right_III
   left_II ---<BODY>--- right_II
   left_III -<Backward>- right_I

   b. A single leg movement:
   Servos start from default position.
   For a forward movement vertical servo goes up while horizontal servo goes forward. And then vertical servo goes down while horizontal servo goes backward.
   pos=1
   / \
    / \
    / \
    pos=2---pos=3---pos=4

   c. Legs servos (PWM 0-11)
   Front is where the robot is facing and where the camera is.
   Horizontal servos - move the leg forward and backward.
   Vertical servos - move the leg up and down.

   Left Side:

   - Front Left Leg (left_I): PWM 0 (horizontal), PWM 1 (vertical)
   - Middle Left Leg (left_II): PWM 2 (horizontal), PWM 3 (vertical)
   - Back Left Leg (left_III): PWM 4 (horizontal), PWM 5 (vertical)

   Right Side:

   - Front Right Leg (right_III): PWM 10 (horizontal), PWM 11 (vertical)
   - Middle Right Leg (right_II): PWM 8 (horizontal), PWM 9 (vertical)
   - Back Right Leg (right_I): PWM 6 (horizontal), PWM 7 (vertical)

   d. Camera Servos (PWM 12-13)

   - PWM 12: Camera Left/Right movement
   - PWM 13: Camera Up/Down movement

   e. Unused PWMs

   - PWM 14: Not used in this code
   - PWM 15: Not used in this code

4. Coding guidelines:
   - When working with the project code, please do not remove the commented code!
aws
bootstrap
css
golang
html
javascript
react
typescript
+2 more

First Time Repository

TypeScript

Languages:

CSS: 5.6KB
HTML: 0.4KB
JavaScript: 0.7KB
TypeScript: 41.0KB
Created: 12/22/2024
Updated: 1/12/2025

All Repositories (1)