Reference for Wiring 1.0 (ALPHA) 0017+. If you have a previous version, use the reference included with your software.
If you see any errors or have any comments, let us know.
Name
bitWrite
Examples
byte x = 33; // sets x to 33 (00100001 in binary)
bitWrite(x, 2, 1); // writes a 1 to the second bit bit of x, now x is 00100101 (37 in decimal)
Description
The bitWrite command writes 0 or 1 to de desired bit of a byte variable.
바이트 변수의 지정된
비트 위치로 비트 값을
설정합니다.
Syntax
bitWrite(byteValue, bitIndex, bitValue)
Parameters
byteValue
byte: the byte variable to write the bit to
설정할 바이트