This commit is contained in:
hugo LAMY
2025-03-17 09:09:52 +01:00
parent e59346adc6
commit 3cd6e72b8d

View File

@@ -31,7 +31,7 @@ void print_hex_value(char c) {
void print_data() {
uint8_t data;
for (uint8_t i = 0; i < 7; i++) {
for (uint8_t i = 0; i < 7; i++) { // doc AHT20, 7.4 : >= 7 bytes -> CRC (Cyclic Redundancy Check), an error-detecting code
data = i2c_read_nack();
print_hex_value(data);
if (i == 0) {
@@ -116,7 +116,7 @@ int main() {
i2c_start_repeat();
i2c_send_addr_w(AHT20_ADDRESS);
_delay_ms(20);
_delay_ms(10);
// aht20_wait_for_status();
i2c_write(0xAC);