Skip to content

Commit

Permalink
info
Browse files Browse the repository at this point in the history
  • Loading branch information
ImplFerris committed Oct 20, 2024
1 parent 8469095 commit 38080b3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/blinky/embassy.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This example code is taken from rp235x-hal repo (It also includes additional exa

["https://github.com/rp-rs/rp-hal/tree/main/rp235x-hal-examples"](https://github.com/rp-rs/rp-hal/tree/main/rp235x-hal-examples)

It creates a blinking effect by toggling the pin's output state between high and low.

## The main code
```rust
#![no_std]
Expand Down
7 changes: 7 additions & 0 deletions src/blinky/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,12 @@

In this section, we'll learn how to blink an LED using the Raspberry Pi Pico 2. In embedded system programming, blinking an LED is the equivalent of "Hello, World!"

## How to make the LED blink?

The onboard LED of the Pico is connected to GPIO pin 25 (based on the datasheet). To make it blink, we toggle the pin between high and low states at regular intervals. This turns the LED on and off, producing a blinking effect.

## Choosing the crate
You can develop using two main approaches: the rp-rs HAL or the Embassy framework.

- [With rp-rs](./rp-rs.md)
- [With embassy](./embassy.md)
8 changes: 2 additions & 6 deletions src/blinky/rp-rs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This example code is taken from rp235x-hal repo (It also includes additional exa

["https://github.com/rp-rs/rp-hal/tree/main/rp235x-hal-examples"](https://github.com/rp-rs/rp-hal/tree/main/rp235x-hal-examples)

It adjusts the LED's brightness by changing the duty cycle at regular intervals, creating a blinking effect.

## The main code
```rust
Expand Down Expand Up @@ -145,9 +146,4 @@ cd pico2-blinky/rprs-blinky
## How to Run?

You refer the ["Running The Program"](../running.md) section


## Explanation
Let's break it down and explain any parts that need clarification.

//TODO

2 changes: 1 addition & 1 deletion src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This book is an informal collection of what I explore, tinker with, and learn along the way. The content isn't meant to be professional; Just raw documentation of my journey.

## Meet the hardware - Pico 2
We will be using the Raspberry Pi Pico 2. It features the new RP2350 chip with dual-core flexibility—offering Arm Cortex-M33 cores and optional RISC-V Hazard3 cores. You can operate it as the standard ARM core or switch to the RISC-V architecture. You find more details from the [official website](https://www.raspberrypi.com/products/raspberry-pi-pico-2/).
We will be using the Raspberry Pi Pico 2 (RP2350 chip). It features the new RP2350 chip with dual-core flexibility—offering Arm Cortex-M33 cores and optional RISC-V Hazard3 cores. You can operate it as the standard ARM core or switch to the RISC-V architecture. You find more details from the [official website](https://www.raspberrypi.com/products/raspberry-pi-pico-2/).

<img style="display: block; margin: auto;" alt="pico2" src="./images/pico2.png"/>

Expand Down

0 comments on commit 38080b3

Please sign in to comment.