aboutsummaryrefslogtreecommitdiff
path: root/examples/rp23/src/bin/button.rs
diff options
context:
space:
mode:
authorCurly <[email protected]>2025-02-23 07:33:58 -0800
committerCurly <[email protected]>2025-02-23 07:33:58 -0800
commit3932835998802fc3abf7cce4f736e072858ebfd1 (patch)
tree5dd714b99bc74a03556c58809237c88691c293bb /examples/rp23/src/bin/button.rs
parentc3c67db93e627a4fafe5e1a1123e5cbb4abafe47 (diff)
rename `rp23` (?) folder to `rp235x`; fix `ci.sh` to use `rp235x` folder
Diffstat (limited to 'examples/rp23/src/bin/button.rs')
-rw-r--r--examples/rp23/src/bin/button.rs28
1 files changed, 0 insertions, 28 deletions
diff --git a/examples/rp23/src/bin/button.rs b/examples/rp23/src/bin/button.rs
deleted file mode 100644
index 4ad2ca3b7..000000000
--- a/examples/rp23/src/bin/button.rs
+++ /dev/null
@@ -1,28 +0,0 @@
1//! This example uses the RP Pico on board LED to test input pin 28. This is not the button on the board.
2//!
3//! It does not work with the RP Pico W board. Use wifi_blinky.rs and add input pin.
4
5#![no_std]
6#![no_main]
7
8use embassy_executor::Spawner;
9use embassy_rp::gpio::{Input, Level, Output, Pull};
10use {defmt_rtt as _, panic_probe as _};
11
12#[embassy_executor::main]
13async fn main(_spawner: Spawner) {
14 let p = embassy_rp::init(Default::default());
15 let mut led = Output::new(p.PIN_25, Level::Low);
16
17 // Use PIN_28, Pin34 on J0 for RP Pico, as a input.
18 // You need to add your own button.
19 let button = Input::new(p.PIN_28, Pull::Up);
20
21 loop {
22 if button.is_high() {
23 led.set_high();
24 } else {
25 led.set_low();
26 }
27 }
28}