IP controlled relay board - feedback
Posted: Tue Jun 18, 2019 8:57 am
I've built a remote controlled power supply box based around an eight channel IP controlled relay board that I got from DFRobot -
https://www.dfrobot.com/product-503.html
The board reports the status of all the relays using a single byte of feedback, with one bit for each of the eight channels.
Using Hercules to look at the feedback gives me a single character that is the ASCII equivalent to the returned byte. I've checked the ASCII / binary conversions and it's sending correct feedback.
My problem is that I have no idea how I might be able to convert the byte to binary and look at each bit.
Any ideas ?
Cheers,
Peter
https://www.dfrobot.com/product-503.html
The board reports the status of all the relays using a single byte of feedback, with one bit for each of the eight channels.
Using Hercules to look at the feedback gives me a single character that is the ASCII equivalent to the returned byte. I've checked the ASCII / binary conversions and it's sending correct feedback.
My problem is that I have no idea how I might be able to convert the byte to binary and look at each bit.
Any ideas ?
Cheers,
Peter