Index
 
  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  

bit

   
Examples  
byte a = bit(0);	// Declare variable "a" and assigns a number with the bit 0 set to 1: 00000001 (1 in decimal) 
byte b = bit(2);    // Declare variable "b" and assigns a number with the bit 2 set to 1: 00000100 (4 in decimal) 

Description   The bit command returns a byte with the requested bit set to 1.

지정한bit 를 1 로 설정하여 반환합니다.

   
Syntax  
var = bit(value)
   
Parameters  
value   int: the bit to set to 1 (can be from 0 to 7)
비트 위치를 표시하는 정수( 0 부터 7만 가능)
var   byte: a byte variable to assign the value returned by the bit command
반환된 값을 저장하는 바이트 변수
   
Returns  
   
Usage   Application
   
Related   bitRead()
bitWrite()
lowByte()
highByte()
makeWord()