---
title: "Discussion on \"Embedded Rust & Embassy: GPIO Button Controlled Blinking\" | Hashnode"
description: "Discussion on \"Embedded Rust & Embassy: GPIO Button Controlled Blinking\". This blog post is the first one of a multi-part series of posts where I will explore various peripherals of the STM32 microcontroller using the embedded Rust embassy framework.\n\nIntroduction\nUntil rec"
url: "https://hashnode.com/posts/embedded-rust-embassy-gpio-button-controlled-blinking/637bdccf5271d494290252b3"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Embedded Rust & Embassy: GPIO Button Controlled Blinking](https://blog.theembeddedrustacean.com/embedded-rust-embassy-gpio-button-controlled-blinking?utm_source=hashnode&utm_medium=feed)

This blog post is the first one of a multi-part series of posts where I will explore various peripherals of the STM32 microcontroller using the embedded Rust embassy framework. Introduction Until rec

Nov 21, 2022 · 16 min read · blog.theembeddedrustacean.com  
Updated Jul 1  
Read the article

-   [#rust](https://hashnode.com/tag/rust)
-   [#iot](https://hashnode.com/tag/iot)
-   [#tutorial](https://hashnode.com/tag/tutorial)
-   [#beginner](https://hashnode.com/tag/beginner)

## Written by

[Omar Hiari](https://hashnode.com/@omarhiari)

@omarhiari

  
[View profile](https://hashnode.com/@omarhiari)

I am an 📟 Embedded Engineer with years of experience in both industry 🏭 and academia 🏫. Passionate Mentor 👨‍💼 and Instructor 👨‍🏫. Rustacean 🦀

## Responses 1

Markdown supported · ⌘↵ to post

[Greger Sernemar](https://hashnode.com/@GregDeMare)

[Jan 6, 2023](https://hashnode.com/posts/embedded-rust-embassy-gpio-button-controlled-blinking/637bdccf5271d494290252b3/comment/63b8709e624134a0c9b364f9)

Hello Omar,

I try to test this example but I get compile errors! Do you know what is the problem? Regards, Greger Sernemar

error\[E0635\]: unknown feature `impl_trait_projections` --> /Users/greggoogelgs/.cargo/registry/src/github.com-1ecc6299db9ec823/embedded-io-0.4.0/src/lib.rs:2:59 | 2 | #!\[cfg\_attr(feature = "async", feature(async\_fn\_in\_trait, impl\_trait\_projections))\] | ^^^^^^^^^^^^^^^^^^^^^^

Compiling cortex-m v0.7.7 Compiling futures-channel v0.3.25 error\[E0760\]: `async fn` return type cannot contain a projection or `Self` that references lifetimes from a parent scope --> /Users/greggoogelgs/.cargo/registry/src/github.com-1ecc6299db9ec823/embedded-io-0.4.0/src/asynch.rs:86:49 | 86 | async fn read(&mut self, buf: &mut \[u8\]) -> Result<usize, Self::Error> { | ^^^^^^^^^^^^^^----^^^^^^^^ | | | help: consider spelling out the type instead: `<&mut T as asynch::Read>`

[Omar Hiari](https://hashnode.com/@omarhiari)

[Jan 6, 2023](https://hashnode.com/posts/embedded-rust-embassy-gpio-button-controlled-blinking/637bdccf5271d494290252b3/comment/63b8709e624134a0c9b364f9#reply-63b88b3a624134a0c9b374df)

Hello Greger, I used to get these errors when the embassy dependencies in the Cargo.toml weren't pointing at the correct repo and version. Here's what I have:

```
embassy-sync = { version = "0.1.0", git = "github.com/embassy-rs/embassy"}
embassy-executor = { version = "0.1.0", git = "github.com/embassy-rs/embassy", features = ["integrated-timers"] }
embassy-time = { version = "0.1.0", git = "github.com/embassy-rs/embassy", features = ["unstable-traits", "tick-hz-32_768"] }
embassy-stm32 = { version = "0.1.0", git = "github.com/embassy-rs/embassy", features = ["nightly", "unstable-traits", "stm32f429zi", "unstable-pac", "memory-x", "time-driver-any", "exti"]  }
```
