#pragma once

#include <NimBLEDevice.h>
#include <Arduino.h>

// Define constants
#define GET_CHECK_DEVICE 0xD5
#define GET_DEVICE_INFO 0x10
#define SET_IC_MODEL 0x1C
#define SET_RGB_SEQUENCE 0x3C
#define SET_LED_NUM 0x2D
#define SET_DEVICE_NAME 0xBB
#define TURN_ON 0xAA
#define TURN_OFF 0xAB
#define SET_STATIC_COLOR 0x1E
#define SET_BRIGHT 0x2A
#define SET_WHITE 0x69
#define SET_PRESET 0x2C
#define SET_SPEED 0x03
#define SET_AUTO_MODE 0x06

// Initializes the BLE server, services, and advertising
void Init_BLE_SP110E(NimBLEServer* pServer);

void sendToAllClients(const uint8_t *data, size_t len);

void process_BLE_SP110E_Command(const uint8_t* val, uint8_t len, NimBLECharacteristic* bleChar);

void Init_BLE_LightStick_Client();

void BLE_LightStick_Client_Task(void *parameter);



