Now I trying to understand the transmitter functionality.
I would be very thankful, If you (or some one else) can add a little explanation for those functions, especially in few moments:
in sendCommand() function there is a line
var bits = (CODE & ~0b11111) | command;
what we trying to put in "bits"? If I understand correctly, this part
(CODE & ~0b11111)
always returns our "CODE" with five right zeros, what for?
In setWatch() :
socketOn = !socketOn;
we switch between 0 and 1, what for? Is there some reason for?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Now I trying to understand the transmitter functionality.
I would be very thankful, If you (or some one else) can add a little explanation for those functions, especially in few moments:
in sendCommand() function there is a line
what we trying to put in "bits"? If I understand correctly, this part
always returns our "CODE" with five right zeros, what for?
In setWatch() :
we switch between 0 and 1, what for? Is there some reason for?
Thank you in advance.