Got the reversed bit issue figured out. I was starting at the wrong end of byte while saving and loading.
But in the process I changed how editing and saving bits works. Instead of loading the byte into an array
int8_t bits[8];
Then editing bits in array before saving, toggling a bit will now directly and immediately set that bit. This will save 8 bytes of global memory we may need later.
Also if we want to blink out all the bits from a byte, it just reads 1 bit at a time, instead of first loading byte to bit array then looping through that array.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.