hi all...
i am in the process of trying to get a gimbal for my camera to be controlled by node red using bluetooth... im not very experienced with this stuff and just kinda stumbling through at the moment...
i need to calculate checksums for some input values before sending the commands to the gimbal..
for example this hexadecimal input
0610030FFF
needs to produce the checksum output of
81BC
from what i understand this is a CRC16-CCITT checksum ? there is a calculator someone has made online already at this location
this calculator produces the correct checksums and also appends the checksum to the initial input values.. so im wondering is there anyway to replicate this code in a function node ? if i could recreate the entire code in node red that would be great but essentially the main part i need is..
crc := crc16.Checksum(packet.Bytes(), crc16.CCITTFalseTable)
binary.Write(packet, binary.BigEndian, crc)
i asked google and chatGPT but what they provided didnt output the correct checksums..
any help is appreciated.. thanks..