21 releases (5 breaking)
0.5.0 | Nov 30, 2022 |
---|---|
0.4.0 | Nov 18, 2022 |
0.3.1 | Nov 11, 2022 |
0.2.0 | Nov 4, 2022 |
0.0.8 | Sep 26, 2022 |
#750 in Hardware support
195KB
4K
SLoC
radiorust
radiorust
is a software defined radio (SDR) library which builds upon the
Tokio runtime and message passing channels.
License
radiorust
is dual-licensed under the terms of the Apache License,
Version 2.0, and the MIT License. Use at your own risk. Before contributing,
you must agree to the publication of your work as part of radiorust
under
these licenses.
lib.rs
:
Software defined radio
Getting started
For getting started, have a look at the blocks
module for a selection
of ready-to-use signal processing blocks and see the "Hello World" example
below.
Hello World example
The following example requires the cpal
feature to be enabled.
use radiorust::prelude::*;
#[tokio::main]
async fn main() {
let morse_keyer = blocks::morse::Keyer::with_message(
4096,
48000.0,
blocks::morse::Speed::from_paris_wpm(16.0),
"<CT> Hello World <AR>",
).unwrap();
let audio_modulator = blocks::FreqShifter::with_shift(700.0);
audio_modulator.feed_from(&morse_keyer);
let playback = blocks::io::audio::cpal::AudioPlayer::new(48000.0, None).unwrap();
playback.feed_from(&audio_modulator);
playback.wait_for_event(|event| {
event.as_any().is::<blocks::morse::events::EndOfMessages>()
}).await;
}
Dependencies
~5–33MB
~503K SLoC