Skip to content

Commit

Permalink
circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
ImplFerris committed Oct 27, 2024
1 parent 6505cff commit 25f2fce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ultrasonic/action.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let pwm = &mut pwm_slices.pwm6; // Access PWM slice 6
pwm.set_ph_correct(); // Set phase-correct mode for smoother transitions
pwm.enable(); // Enable the PWM slice
let led = &mut pwm.channel_b; // Select PWM channel B
led.output_to(pins.gpio13); // Set GPIO 13 as the PWM output pin
led.output_to(pins.gpio3); // Set GPIO 3 as the PWM output pin
```

## Setup the Trigger Pin
Expand Down
Binary file added src/ultrasonic/assets/pico-ultrasonic-led.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/ultrasonic/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ The HC-SR04 Sensor module has a transmitter and receiver. The module has Trigger
- **Trig**: Connect to GPIO 17 on the Pico to start the ultrasonic sound pulses.
- **Echo**: Connect to GPIO 16 on the Pico; this pin sends a pulse when it detects the reflected signal, and the pulse length shows how long the signal took to return.
- **GND**: Connect to the ground pin on the Pico.
- **LED**: Connect the anode (long leg) of the LED to GPIO 13, as in the [External LED setup](../blinky/external-led.md).
- **LED**: Connect the anode (long leg) of the LED to GPIO 3, as in the [External LED setup](../blinky/external-led.md).

<a href="./assets/pico-ultrasonic-led.jpg"><img style="display: block; margin: auto;" alt="pico2" src="./assets/pico-ultrasonic-led.jpg"/></a>

0 comments on commit 25f2fce

Please sign in to comment.