-->
Page 1 of 1

bitRead

PostPosted: Sun Oct 29, 2017 7:26 pm
by stern0m1
Im trying to read bits but im getting weird results.
Code: Select allfor (int i=10;i<100;i++){
 Serial.println(i);
  for(int x =0;x<8;x++){
    Serial.print(bitRead(x,i));
  }
  Serial.println();
}


This is print for most numbers 00000000.
Why? And how can i get the bits?

Thanks

Re: bitRead

PostPosted: Sun Oct 29, 2017 8:41 pm
by McChubby007

Re: bitRead

PostPosted: Sun Oct 29, 2017 9:43 pm
by stern0m1
oh gee i mixed it up...
Thanks i was going out of mind...