This shows you the differences between two versions of the page.
— |
arduino:bits_and_bytes:bitread [2024/02/16 01:04] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======bitRead() ====== | ||
+ | |||
+ | ====Description ==== | ||
+ | |||
+ | Reads a bit of a number. | ||
+ | |||
+ | ====Syntax ==== | ||
+ | |||
+ | bitRead(x, n) | ||
+ | |||
+ | ====Parameters ==== | ||
+ | |||
+ | x: the number from which to read | ||
+ | |||
+ | n: which bit to read, starting at 0 for the least-significant (rightmost) bit | ||
+ | |||
+ | ====Returns ==== | ||
+ | |||
+ | the value of the bit (0 or 1). | ||
+ | |||
+ | ====See also ==== | ||
+ | |||
+ | * [[arduino:bits and bytes:Bit]] | ||
+ | * [[arduino:bits and bytes:BitWrite]] | ||
+ | * [[arduino:bits and bytes:BitSet]] | ||
+ | * [[arduino:bits and bytes:BitClear]] | ||
+ | |||
+ | Source: arduino.cc | ||