| Crates.io | hc12-rs |
| lib.rs | hc12-rs |
| version | 0.5.0-rc1 |
| created_at | 2025-06-05 17:51:09.744741+00 |
| updated_at | 2025-06-21 15:08:56.375189+00 |
| description | A strongly typed, and rusty builder for programming HC-12 radios |
| homepage | |
| repository | https://github.com/thelenlucas/hc12-rs/ |
| max_upload_size | |
| id | 1701990 |
| size | 193,285 |
hc12-rsA builder-syntax programmer for hc01 HC-12 radio modules.
The HC-12 is a fantastic small radio module used for embedded applications,
typically used in hobbyist applications, as it does not require licensing in
most jurisdictions. However, poor documentation and an unconventional parameter
and settings system make it difficult to work with on occasion. This crate provides
methods for programming and reconfiguring the module, without needing to touch serial
devices manually every time.
The best-translated English manual for the module can be found here.
HC-12 modules dynamically with error handlingno-std and no-alloc capable
let mut hc12 = HC12::new(serial, programming_pin, &mut delay)
.unwrap()
.channel(Channel::new(15).unwrap())
.power(Power::P8)
.b4800()
.fu3()
.program(&mut timer_two)
.unwrap()
.into_transparent_mode()
.unwrap();
hc12.write_all("Hello world!".as_bytes()).ok();
let mut hc12_low_power = hc12.into_programming_mode()
.fu1()
.unwrap()
.into_transparent_mode()
.unwrap();
hc12_low_power.write_all(b"Hello from the low power mode!").ok();
defmt-03: Support for defmt logging macros