---
title: "Christian Foucher (@Valda60) | Hashnode"
description: "Industrial software engineer (embedded and computer platforms). Rust enthusiast. Read the latest articles by Christian Foucher on Hashnode."
url: "https://hashnode.com/@Valda60"
---

@Valda60

# Christian Foucher

@Valda60 · Joined July 2023

Industrial software engineer (embedded and computer platforms). Rust enthusiast.

## Comments

[Is it possible to know the memory footprint of BLE Server (FLASH, RAM) ? I have a project of BLE Joystick (my current code is using C++ and ESP32-BLE-Gamepad library), my final goal is to make a Rust implementation. I wonder if it will fit ESP32 memory.](https://hashnode.com/posts/embedded-rust-bluetooth-on-esp-ble-server/66013d2329a52ebd8ba30763/comment/66054878b91d16f2caba3f8f)

Comment · Article · Mar 28, 2024 · [Embedded Rust Bluetooth on ESP: BLE Server](https://hashnode.com/posts/embedded-rust-bluetooth-on-esp-ble-server/66013d2329a52ebd8ba30763)

[Omar Hiari https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=d62f808a88b8798568ad0323173f36e2](https://hashnode.com/posts/esp32-standard-library-embedded-rust-analog-temperature-sensing-using-the-adc/64df0bf057b35200b444521c/comment/64e730762a4db2f7752735bb#reply-64e8ad5cf659a80ea33ed576)

Reply · Article · Aug 25, 2023 · [ESP32 Standard Library Embedded Rust: Analog Temperature Sensing using the ADC](https://hashnode.com/posts/esp32-standard-library-embedded-rust-analog-temperature-sensing-using-the-adc/64df0bf057b35200b444521c)

[Hello Omar, Do you know what happens when the adc.read function returns 0 ? Temperature computation will do a floating division by 0 (=+INF). I have tested on Wokwi, it seems OK (Temperature -273.15 Celcius). Rust follows the IEEE 754 rules.](https://hashnode.com/posts/esp32-standard-library-embedded-rust-analog-temperature-sensing-using-the-adc/64df0bf057b35200b444521c/comment/64e730762a4db2f7752735bb)

Comment · Article · Aug 24, 2023 · [ESP32 Standard Library Embedded Rust: Analog Temperature Sensing using the ADC](https://hashnode.com/posts/esp32-standard-library-embedded-rust-analog-temperature-sensing-using-the-adc/64df0bf057b35200b444521c)

[Omar Hiari I have another suggestion. It concerns the displayed message. I have added a remark to the issue #2 on github repository (more clear than typing it here). It is about the decimal that can't be displayed because of the computation that gives an integer result. By the way, it permits to increase timer resolution in the displayed message.](https://hashnode.com/posts/esp32-standard-library-embedded-rust-timers/64cbb8ea099350c77ac6d8cd/comment/64d6348d764f843874c4564c#reply-64d9f2046203e95780d636e4)

Reply · Article · Aug 14, 2023 · [ESP32 Standard Library Embedded Rust: Timers](https://hashnode.com/posts/esp32-standard-library-embedded-rust-timers/64cbb8ea099350c77ac6d8cd)

[Hello Omar, I propose a refactoring in your github repository (see issue #2). I admit that it was not straight forward to write the parameters of the function!](https://hashnode.com/posts/esp32-standard-library-embedded-rust-timers/64cbb8ea099350c77ac6d8cd/comment/64d6348d764f843874c4564c)

Comment · Article · Aug 11, 2023 · [ESP32 Standard Library Embedded Rust: Timers](https://hashnode.com/posts/esp32-standard-library-embedded-rust-timers/64cbb8ea099350c77ac6d8cd)

[Another suggestion, you can remove all the "return" key words of the button\_pressed function (don't forget to remove also semicolon). It is more idiomatic Rust, but also less readable for the new comer. fn buttonpressed(but: &PinDriver<', Gpio3, Input>, del: &u32) -> u32 { // Check if Button has been pressed // If not pressed, return the delay value unchanged if but.is\_low() { // if the value of the delay passed is less of equal to 50 then reset it to initial value // else subtract 50 from the passed delay println!("Button Pressed!"); if del <= &50\_u32 { 200\_u32 } else { 50\_u32 } } else { \*del } }](https://hashnode.com/posts/esp32-standard-library-embedded-rust-gpio-control/64afe421c3220ca4300ee7a2/comment/64ba889a2e3477ebf613499c)

Comment · Article · Jul 21, 2023 · [ESP32 Standard Library Embedded Rust: GPIO Control](https://hashnode.com/posts/esp32-standard-library-embedded-rust-gpio-control/64afe421c3220ca4300ee7a2)

[Omar Hiari I have created a suggestion issue in your gitlab repository (because code formatting is ugly in my comment).](https://hashnode.com/posts/esp32-standard-library-embedded-rust-gpio-control/64afe421c3220ca4300ee7a2/comment/64b94706a884f3de56a26afd#reply-64ba7c8d2e3477ebf613485f)

Reply · Article · Jul 21, 2023 · [ESP32 Standard Library Embedded Rust: GPIO Control](https://hashnode.com/posts/esp32-standard-library-embedded-rust-gpio-control/64afe421c3220ca4300ee7a2)

[I think you should use an array instead of declaring 10 variables (one variable by pin!). Then you will be able to iterate the array with a for loop. // Configure all LED pins to digital outputs let mut leds = \[ PinDriver::output(dp.pins.gpio1.downgrade\_output()).unwrap(), PinDriver::output(dp.pins.gpio10.downgrade\_output()).unwrap(), PinDriver::output(dp.pins.gpio19.downgrade\_output()).unwrap(), PinDriver::output(dp.pins.gpio18.downgrade\_output()).unwrap(), PinDriver::output(dp.pins.gpio4.downgrade\_output()).unwrap(), PinDriver::output(dp.pins.gpio5.downgrade\_output()).unwrap(), PinDriver::output(dp.pins.gpio6.downgrade\_output()).unwrap(), PinDriver::output(dp.pins.gpio7.downgrade\_output()).unwrap(), PinDriver::output(dp.pins.gpio8.downgrade\_output()).unwrap(), PinDriver::output(dp.pins.gpio9.downgrade\_output()).unwrap(), \]; // Put the following code in the loop for mut led in &mut leds { // LED i led.set\_high().unwrap(); blinkdelay = button\_pressed(&button, &blinkdelay); FreeRtos::delay\_ms(blinkdelay); led.set\_low().unwrap(); FreeRtos::delay\_ms(100\_u32); } // I have tested the result on wokwi](https://hashnode.com/posts/esp32-standard-library-embedded-rust-gpio-control/64afe421c3220ca4300ee7a2/comment/64b94706a884f3de56a26afd)

Comment · Article · Jul 20, 2023 · [ESP32 Standard Library Embedded Rust: GPIO Control](https://hashnode.com/posts/esp32-standard-library-embedded-rust-gpio-control/64afe421c3220ca4300ee7a2)
