Bit Operations - bitSet/bitClear #1331
Replies: 3 comments
-
Posted at 2019-07-01 by Robin Mon 2019.07.01 Hi @user101402, I just Googled 'how to set a bit javascript' and result set is with examples:
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. See "Bitwise Operators" under the "Structure" heading at:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-07-02 by @MaBecker here you find some samples |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-07-02 by Crash Thank you for your help :) Works great. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-07-01 by Crash
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.
Beta Was this translation helpful? Give feedback.
All reactions