Camera Slider Firmware 1.0
Firmware for camera slider with stepper motor control and BLE communication
Macros

Available commands that can be sent via BLE UART. More...

Macros

#define BLE_CMD_BACKWARD   'b'
 Move slider backward.
 
#define BLE_CMD_FORWARD   'a'
 Move slider forward.
 
#define BLE_CMD_POSITION   "pos:"
 Set target position.
 
#define BLE_CMD_SPEED   "speed:"
 Set movement speed.
 
#define BLE_CMD_STATUS   's'
 Get device status.
 
#define BLE_CMD_STOP   'x'
 Emergency stop.
 

Detailed Description

Available commands that can be sent via BLE UART.

Commands are sent as single characters or strings over the BLE UART service. All commands are processed in the main loop and provide immediate feedback.

Macro Definition Documentation

◆ BLE_CMD_BACKWARD

#define BLE_CMD_BACKWARD   'b'

Move slider backward.

  • Command: 'b'
  • Action: Moves the camera slider backward by 50 steps
  • LED: Toggles green LED state
  • Response: "b intercept - change dir" sent to serial
Note
This command changes the current direction and moves the slider
See also
slide_dist()

Definition at line 133 of file ble_api.h.

◆ BLE_CMD_FORWARD

#define BLE_CMD_FORWARD   'a'

Move slider forward.

  • Command: 'a'
  • Action: Moves the camera slider forward by 50 steps
  • LED: Toggles green LED state
  • Response: "a intercept - change dir" sent to serial
Note
This command changes the current direction and moves the slider
See also
slide_dist()

Definition at line 119 of file ble_api.h.

◆ BLE_CMD_POSITION

#define BLE_CMD_POSITION   "pos:"

Set target position.

  • Command: "pos:<value>"
  • Action: Moves slider to absolute position
  • Response: "Moving to position <value>"
Note
This command is planned for future implementation

Definition at line 181 of file ble_api.h.

◆ BLE_CMD_SPEED

#define BLE_CMD_SPEED   "speed:"

Set movement speed.

  • Command: "speed:<value>"
  • Action: Sets the movement speed (1-100)
  • Response: "Speed set to <value>"
Note
This command is planned for future implementation

Definition at line 169 of file ble_api.h.

◆ BLE_CMD_STATUS

#define BLE_CMD_STATUS   's'

Get device status.

  • Command: 's'
  • Action: Returns current device status and position
  • Response: JSON formatted status string
Note
This command is planned for future implementation

Definition at line 145 of file ble_api.h.

◆ BLE_CMD_STOP

#define BLE_CMD_STOP   'x'

Emergency stop.

  • Command: 'x'
  • Action: Immediately stops all motor movement
  • Response: "STOP" confirmation
Note
This command is planned for future implementation

Definition at line 157 of file ble_api.h.