Skip to content

Commit

Permalink
thermistor
Browse files Browse the repository at this point in the history
  • Loading branch information
ImplFerris committed Nov 17, 2024
1 parent e682448 commit 0f43eeb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/thermistor/temperature/action.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ display.write_str(&buff).unwrap();
Timer::after_secs(1).await;
```

### Clear the Buffer and Screen
```rust
buff.clear();
display.clear().unwrap();
```

### Final code
```rust
#![no_std]
Expand Down Expand Up @@ -248,6 +254,9 @@ async fn main(_spawner: Spawner) {
let mut buff: String<64> = String::new();
let ref_temp = celsius_to_kelvin(REF_TEMP);
loop {
buff.clear();
display.clear().unwrap();

let adc_value = adc.read(&mut p26).await.unwrap();
writeln!(buff, "ADC: {}", adc_value).unwrap();

Expand Down

0 comments on commit 0f43eeb

Please sign in to comment.