uint16_t time;
uint8_t rxcnt = 0, txpoint = 0;
-uint8_t rxbuf[11];
+uint8_t rxbuf[15];
uint8_t txbuf[12];
uint16_t adc[16]; // raw values from ADC
uint16_t V_in = 0;
txbuf[length + 2] = 0;
send_answer_buf(txbuf);
rxcnt = 0;
- } else if (rxcnt == 11 && is_my_address(10)) {
- // message is for this uC
-// } else if (is_my_address(10)) { //answer 0x00d1 works with this line
+ } else if (rxcnt == 11 && is_my_address(10)) {// message with correct length is for this uC
if (rxbuf[0] == 'W') {
// write
}
}
}
- if (rxcnt >= 11 || buf == '\n' || buf == '\r') {
- rxcnt = 0;
- }
}
+ if (rxcnt >= 11 || buf == '\n' || buf == '\r') {
+ rxcnt = 0;
+ }
+
}