Switched to the for loop and bit masking to check the bit value

This commit is contained in:
Dan
2022-09-12 22:17:36 -04:00
parent 4064a2b0d8
commit 7bcd492a47

View File

@@ -44,25 +44,16 @@ void sendBlast(void) {
sendShort();
_delay_ms(BIT_LENGTH);
//Start 32 bit Code
for (int i=0; i<9;i++){
for(int i=0; i<32; i++){
if (code &0x80000000){
sendShort();
}
for (int i=0;i<8;i++){
else{
sendLong();
code<<=1;
}
for (int i=0;i<6;i++){
sendShort();
}
for (int i=0;i<3;i++){
sendShort();
}
for (int i=0;i<4;i++){
sendLong();
}
for(int i=0;i<2;i++){
sendShort();
}
//stop bit
sendShort();
}