Crates.io | embassy_buddy |
lib.rs | embassy_buddy |
version | |
source | src |
created_at | 2025-03-31 11:01:58.18437+00 |
updated_at | 2025-03-31 11:01:58.18437+00 |
description | A board support crate for the Prusa Buddy Board. |
homepage | |
repository | https://github.com/jamesgopsill/embassy-buddy |
max_upload_size | |
id | 1613279 |
Cargo.toml error: | TOML parse error at line 23, column 1 | 23 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A Board Support Crate (BSP) for the Prusa Buddy board that powers the Prusa Mini. The crate is still in development.
Examples can be found in the examples
folder on GitHub. These can be run using:
cargo run --example buzzer
And here is the examples/buzzer.rs
.
#![no_std]
#![no_main]
use defmt::*;
use defmt_rtt as _;
use embassy_buddy::{buzzer::Buzzer, Board, BuddyMutex};
use embassy_executor::Spawner;
use embassy_stm32::peripherals::TIM2;
use embassy_time::Timer;
use panic_probe as _;
#[embassy_executor::main]
async fn main(spawner: Spawner) {
let p = embassy_stm32::init(Default::default());
let board = Board::default_mini(p).await;
spawner.must_spawn(buzz(&board.buzzer));
}
#[embassy_executor::task()]
pub async fn buzz(buzzer: &'static BuddyMutex<Buzzer<TIM2>>) {
let mut guard = buzzer.lock().await;
let buzzer = guard.as_mut().unwrap();
buzzer.enable().await;
let mut n = 0;
loop {
info!("Buzz");
buzzer.set_duty_cycle_fraction(1, 2).await;
Timer::after_millis(100).await;
buzzer.set_duty_cycle_fully_off().await;
Timer::after_secs(1).await;
n += 1;
if n > 5 {
break;
}
}
info!("Buzz Finished");
}
Please consider supporting the crate by:
Well me for starters. My research is developing and studying decentalised trusted Artificial Intelligent (AI) agent networks. This crate is contributing to a reference model demonstrating how we can embed AIgents in manufacturing machines. The machines then join networks where they can broker work with one another an AIgents who are acting on behalf of jobs in the network. We have a network set up in our lab that handles our own job loads.
The trust element is required in order to prove that the AIgents are who they say they are. For example, the machine I am talking to is the machine I think it is and a job is coming from someone I know it is. We achieve this by using blockchain, self-soverign identities, verifiable credentials, smart contract, Hardware Unique Key (HUK) and One-Time Programming (OTP) technologies.
We have selected Rust as the language for the entire reference model stack oweing to its memory-safety, performance, and we can use it for embedded systems, desktop, webapp, and server-side applications.
Sure, send me a message.