int value = 0b11001010; // Binary representation of a value
int bitPosition = 3; // Position of the bit to read

void setup() {
  Serial.begin(9600);

  int bitValue = bitRead(value, bitPosition);
  
  Serial.println(bitValue);
}

void loop() {
  // The loop() function is not used in this example
}