aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorHenrik Alsér <[email protected]>2022-05-07 01:15:01 +0200
committerHenrik Alsér <[email protected]>2022-05-07 01:15:01 +0200
commit108a98136096f8b530266aa6687bdbbed4a6a382 (patch)
tree26a8b690db64b7edf2ba94f040635823a5622509 /examples
parent840bb2952e68465ff5e58846db5a4f1ced76834b (diff)
Change example pins
Diffstat (limited to 'examples')
-rw-r--r--examples/nrf/src/bin/qdec.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/nrf/src/bin/qdec.rs b/examples/nrf/src/bin/qdec.rs
index 9c670cea0..bf5b11468 100644
--- a/examples/nrf/src/bin/qdec.rs
+++ b/examples/nrf/src/bin/qdec.rs
@@ -17,13 +17,12 @@ use panic_probe as _;
17async fn main(_spawner: Spawner, p: Peripherals) { 17async fn main(_spawner: Spawner, p: Peripherals) {
18 let irq = interrupt::take!(QDEC); 18 let irq = interrupt::take!(QDEC);
19 let config = qdec::Config::default(); 19 let config = qdec::Config::default();
20 let mut rotary = Qdec::new(p.QDEC, irq, p.P1_13, p.P0_12, config); 20 let mut rotary_enc = Qdec::new(p.QDEC, irq, p.P0_31, p.P0_30, config);
21 // let mut rotary = Qdec::new(p.QDEC, irq, p.P0_31, p.P0_30, config);
22 21
23 info!("Turn rotary encoder!"); 22 info!("Turn rotary encoder!");
24 let mut value = 0; 23 let mut value = 0;
25 loop { 24 loop {
26 value += rotary.read().await; 25 value += rotary_enc.read().await;
27 info!("Value: {}", value); 26 info!("Value: {}", value);
28 } 27 }
29} 28}