aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJacob Rosenthal <[email protected]>2021-11-11 23:32:34 -0700
committerJacob Rosenthal <[email protected]>2021-11-11 23:32:34 -0700
commitb4cb24c7356c0c655fa15bf6996ddbe383df8707 (patch)
treeef5131cabf673a61475b8b4c9822ac8c3910f175 /examples
parent67baec472de1fb7ee6db2781278480e10ed30f24 (diff)
pwm_servo example comment for clarity
Diffstat (limited to 'examples')
-rw-r--r--examples/nrf/src/bin/pwm_servo.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/nrf/src/bin/pwm_servo.rs b/examples/nrf/src/bin/pwm_servo.rs
index 700b88574..7859a858e 100644
--- a/examples/nrf/src/bin/pwm_servo.rs
+++ b/examples/nrf/src/bin/pwm_servo.rs
@@ -26,6 +26,7 @@ async fn main(_spawner: Spawner, p: Peripherals) {
26 // 1ms 0deg (1/.008=125), 1.5ms 90deg (1.5/.008=187.5), 2ms 180deg (2/.008=250), 26 // 1ms 0deg (1/.008=125), 1.5ms 90deg (1.5/.008=187.5), 2ms 180deg (2/.008=250),
27 loop { 27 loop {
28 info!("45 deg"); 28 info!("45 deg");
29 // poor mans inverting, subtract our value from max_duty
29 pwm.set_duty(0, 2500 - 156); 30 pwm.set_duty(0, 2500 - 156);
30 Timer::after(Duration::from_millis(5000)).await; 31 Timer::after(Duration::from_millis(5000)).await;
31 32