Skip to content

Protocol

Alex Cordonnier edited this page Sep 1, 2016 · 1 revision

The baud rate of bluetooth COM port must be either 57600 or 9600 initially, depending on whether the JY-MCU module is version 1.05 or 1.06. It can then be changed to a different baud rate using the AT+BAUD commands.

Packets are sent out as fast as possible, iterating over the array of channels. At 19200 baud and 7 lights, this should result in about 34 fps.

Message format

0x53 0x49 0x47 0x4D red green blue checksum

Header

ASCII encoded "SIGM"

  • 0x53, 0x49, 0x47, 0x4D
  • If the header is invalid, the packet is ignored and "ERR" is replied

Data

Red, Green, Blue values (0-255, where 255 is full brightness)

Checksum

Last byte: 8-bit sum of data bytes

  • If the checksum is invalid, the packet is ignored and "ERR" is replied, followed by a newline
  • If the entire packet is valid, the new RGB values are used and "OK" is replied, followed by a newline
Clone this wiki locally