-
• #2
Mon 2019.07.01
Hi @user101402, I just Googled 'how to set a bit javascript' and result set is with examples:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators
If needed, creating a wrapper function should be a trivial exercise.
If Javascript is a new language for you, the above two links are excellent reference sites to hangout and peruse.
The syntax is the same as in Arduino using either C/C++See "Bitwise Operators" under the "Structure" heading at:
https://www.arduino.cc/reference/en/#functions
https://www.cprogramming.com/tutorial/bitwise_operators.html
-
• #3
here you find some samples
-
• #4
Thank you for your help :) Works great.
Hi guys,
on Arduino I used the functions "bitSet()" and "bitClear().
Link: https://www.arduino.cc/reference/en/language/functions/bits-and-bytes/bitset/
I have the following data: 0b00000000
I would like to switch a specific bit to 1 or 0. How can I do that with javascript/espruino?
Thank you.