jkelleyrtp / dw1000-rs

Rust driver crate for the Decawave DW1000 UWB transceiver
47 stars 10 forks source link

Raspberry pi integration #154

Open tomazbracic opened 1 year ago

tomazbracic commented 1 year ago

I was really happy to see that there are results on crates.io for dwm1001. Then I realized, that those crates are meant for flashing the module itself if not mistaken. I am totally new in rust embedded, so this is not really working for me. And I need to build a solution on Raspberry Pi, because data will be sent further for UI drawing, etc.

Can I "reuse" this crate with minimal reconfiguration to move it from "embedded" to a normal "std" enabled crate? Is there perhaps any example/blog post of that?

I would really like to use Rust on RPi for that, but I am currently stuck.

I would appreciate any tip/help/link

BR, Tomaz

jkelleyrtp commented 1 year ago

I haven't tried yet but since the DW1000 crate interacts through SPI, I think you can just set up the raspi SPI pins directly and get a handle to the module. Note that this is not for the DW1001 module, but you won't be missing much beyond some LEDs and accelerometer data.

https://github.com/jkelleyrtp/dw1000-rs/blob/master/dw1000/src/ll.rs#L37

Otherwise, you will want to build an API over the UART line which is more work.