# Using Embedded Rust for Battery-Powered Devices
> [! note]-
> The content of this page is generated by audio/video transcription and text transformation from the content and links of this source.
Source: [https://fosdem.org/2025/schedule/event/fosdem-2025-6300-using-embedded-rust-to-build-an-unattended-battery-powered-device/](https://fosdem.org/2025/schedule/event/fosdem-2025-6300-using-embedded-rust-to-build-an-unattended-battery-powered-device/)
<video src="https://video.fosdem.org/2025/h1302/fosdem-2025-6300-using-embedded-rust-to-build-an-unattended-battery-powered-device.av1.webm" controls></video>
## Summary & Highlights:
The session at FOSDEM 2025 discusses the use of embedded Rust to create an unattended, battery-powered device for measuring light pollution. The project, initiated by the Libre Space Foundation, aims to develop an open-source photometer to assist astronomers and create a global network of devices. The session covers the technical journey of using Rust, its benefits, and challenges in embedded systems.
**Introduction to the Project**
In late 2023, the Libre Space Foundation tasked the speaker's company with developing an open-source photometer to measure sky quality. The project aimed to create a community-friendly tool accessible to both enthusiasts and professionals, with the vision of building a global network of photometers.
**Technical Approach and Challenges**
The device's architecture is straightforward, consisting of I2C sensors, a microcontroller, and WiFi connectivity. This simplicity allowed the exploration of new technologies, particularly Rust, to build a robust, unattended, battery-powered device. The session shares lessons learned, hurdles overcome, and how Rust became integral to their workflow.
**Importance of Rust in Embedded Systems**
Rust offers several advantages for embedded systems, including powerful static analysis, flexible memory allocation, and safe concurrency. The session highlights Rust's tooling, such as Cargo, which simplifies project management and testing, and the strong community support that enhances its adoption.
**Project Results and Future Prospects**
The project successfully deployed several hundred units in collaboration with the Instituto de Astrofísica de Canarias. The devices are rigorously tested under challenging conditions and are part of a larger vision to create a crowdsourced network for environmental monitoring.
## Importance for an eco-social transformation
The project's significance for eco-social transformation lies in its potential to democratize access to environmental monitoring tools, empowering communities to participate in data collection and analysis. The use of open-source technology ensures transparency and adaptability, crucial for sustainable development. Eco-social designers can leverage Rust's robust features and community support to create reliable and efficient environmental monitoring devices. Challenges include ensuring widespread adoption of Rust in the industry, addressing vendor support issues, and overcoming technical barriers in embedded systems development.
## Slides:
| | |
| --- | --- |
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_001.jpg\|300]] | The first slide introduces the session, highlighting the use of embedded Rust to develop a battery-powered device for measuring light pollution. It emphasizes the project's context within FOSDEM 2025 and its relevance to the Embedded, Mobile and Automotive track.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_002.jpg\|300]] | The second slide provides a disclaimer that the session is not a deep dive into Rust but rather a discussion on its feasibility for developing production-ready embedded devices. The speaker sets the stage for a reflective analysis of Rust's application in this context.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_003.jpg\|300]] | The third slide addresses the problem of light pollution, particularly its impact on astronomers. It also highlights other consequences, including public health, ecological impacts, and cultural identity loss, framing the importance of the project in addressing these issues.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_004.jpg\|300]] | This slide explains the methods for measuring light pollution, comparing two sensors: the discontinued ams TSL237 and the ams TSL25911. The focus is on the technical aspects of these sensors and their application in the project.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_005.jpg\|300]] | The fifth slide discusses popular approaches in the maker community, such as Arduino and MicroPython, and contrasts them with trends impacting the industry, like Rust and Zephyr. It sets the stage for exploring Rust's potential in embedded systems.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_006.jpg\|300]] | The sixth slide delves into why Rust is chosen for this project, referencing the official Rust website. It highlights Rust's features that make it suitable for embedded applications, such as safety, concurrency, and efficiency.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_007.jpg\|300]] | Similar to slide 6, this slide continues to explore the reasons for choosing Rust, emphasizing its benefits for embedded systems development. It reinforces the language's strengths in ensuring robust and reliable device operation.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_008.jpg\|300]] | This slide further elaborates on Rust's advantages, focusing on its tooling and community support. It underscores the importance of these elements in facilitating efficient development and deployment of embedded devices.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_009.jpg\|300]] | The ninth slide continues to highlight Rust's features, particularly its tooling capabilities, which streamline project management and testing. It emphasizes the role of community support in advancing Rust's adoption in embedded systems.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_010.jpg\|300]] | The tenth slide wraps up the discussion on Rust's benefits, reiterating its suitability for embedded applications. It underscores the language's potential to transform traditional development practices in the industry.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_011.jpg\|300]] | This slide introduces Rust's state-of-the-art tooling, highlighting commands like cargo run, cargo test, and cargo add. It emphasizes the availability of numerous crates that enhance functionality and simplify development.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_012.jpg\|300]] | The twelfth slide discusses embedded systems, showcasing the ease of adding new sensors using cargo add commands. It credits the Rust Embedded Devices Working Group for their standardization efforts, which facilitate driver availability.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_013.jpg\|300]] | This slide provides examples of using cargo add to incorporate specific drivers, such as bme280 and adxl345-eh-driver, demonstrating Rust's capability to streamline sensor integration in embedded systems.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_014.jpg\|300]] | The fourteenth slide humorously addresses the challenges of using modern tools like Rust, acknowledging that while they offer significant benefits, they also introduce new complexities that developers must navigate.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_015.jpg\|300]] | This slide offers a balanced view of considering Rust for new projects, highlighting its state-of-the-art tooling and strong community while pointing out areas for improvement, such as vendor support and documentation.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_016.jpg\|300]] | The sixteenth slide details the features of the Dark Sky Meter, including its sensors, connectivity options, and low-power software features. It highlights the device's design to optimize power consumption and data transmission.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_017.jpg\|300]] | This slide mentions the use of external crates, emphasizing the role of community-contributed libraries in extending the functionality of Rust-based embedded projects.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_018.jpg\|300]] | The eighteenth slide focuses on power consumption, a critical aspect of the project, detailing the device's energy use patterns and strategies to minimize power draw during operation.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_019.jpg\|300]] | This slide presents a full night cycle of the device's operation, showcasing power consumption metrics and the device's efficiency in managing energy resources during its active phases.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_020.jpg\|300]] | Slide 20 is not summarized in the provided text, but it likely continues the discussion on power consumption or device performance based on surrounding slide topics.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_021.jpg\|300]] | The twenty-first slide outlines the sampling cycle, approximately 75 seconds long, detailing the process and timing involved in collecting and processing environmental data.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_022.jpg\|300]] | Slide 22 is not summarized in the provided text, but it likely relates to operational aspects of the device, given the context of surrounding slides.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_023.jpg\|300]] | This slide details the sampling and connection cycle, highlighting the integration of data collection and transmission processes to optimize device performance and energy efficiency.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_024.jpg\|300]] | The twenty-fourth slide presents the results of the project, showcasing the device's performance in real-world conditions and its effectiveness in collecting environmental data.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_025.jpg\|300]] | Slide 25 summarizes the environmental conditions during testing, noting temperature changes and battery performance. It highlights the device's resilience and adaptability to varying conditions.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_026.jpg\|300]] | Slide 26 is not summarized in the provided text, but likely continues to present results or conclusions from the project's testing phase.
| ![[FOSDEM 2025/assets/Using-embedded-Rust-to-build-an-unattended-battery/preview_027.jpg\|300]] | The final slide thanks the audience and provides contact information and links to the project's repositories, encouraging further exploration and collaboration.
## Links
[Talk slides](https://fosdem.org/2025/events/attachments/fosdem-2025-6300-using-embedded-rust-to-build-an-unattended-battery-powered-device/slides/238320/FOSDEM25_ylPDHjT.pdf)
[Firmware repository](https://gitlab.com/scrobotics/optical-makerspace/dark-sky-meter-fw)
[Hardware repository](https://gitlab.com/scrobotics/optical-makerspace/dark-sky-meter-hw)
[Video recording (AV1/WebM) - 137.2 MB](https://video.fosdem.org/2025/h1302/fosdem-2025-6300-using-embedded-rust-to-build-an-unattended-battery-powered-device.av1.webm)
[Video recording (MP4) - 552.1 MB](https://video.fosdem.org/2025/h1302/fosdem-2025-6300-using-embedded-rust-to-build-an-unattended-battery-powered-device.av1.mp4)
[Video recording subtitle file (VTT)](https://video.fosdem.org/2025/h1302/fosdem-2025-6300-using-embedded-rust-to-build-an-unattended-battery-powered-device.vtt)