Skip to content

rahul-thakoor/balena-rust-blink

Repository files navigation

rust_gpiozero on balena - Blink!

This project showcases how to use the rust_gpiozero crate to control an LED attached to pin 17 on a raspberry pi. It uses the blink method.

The project also showcases the use of Service Variables in the balena dashboard.

By default, the LED blinking configuraton is as follows:

  • on_time : 2 seconds
  • off_time : 3 seconds

You should see the following output in the logs when the service runs

defaults

To configure the blinking settings, add the service variables for the device:

  • ON_TIME

  • OFF_TIME

service variables

This automatically restarts the servive. You should see the outputs in the logs corresponding to the variables you set:

service variables set

Acknowledgement

This sample project is based on the balena-rust-hello-world sample project from Balena. All credits go to the original authors!

About

rust_gpiozero + balena + raspberry_pi demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages