I am trying to send a command to a lighting device.
The command below works in the hyper term.
\05387988c2g<CR>
\is an ascii characterg<CR>is at the end of every commandgis the acknowledgement key and<CR>is the carriage return
I have tried sending this command using Python’s Serial Module in the code below, but it does not work because \ is an ascii character and g and <CR> are strings that need to be at the end of the command.
Could someone tell me what command I have to send. Any help is appreciated.Thanks.
its not really clear what you expect to send … but assuming I understand this may help.
use r”” which will consider everything to be literal (including \)… additionally you may need to send a carriage return (\r)