-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no_std newbie questions #11
Comments
hey thanks for the questions! all of this should work (and we've been using it under linux for a couple of years now), but, there's also plenty of room for improvement and i have a bunch of updates that i haven't had a chance to make just yet, so, you might experience a bit of flux while I do this (sorry).
yep, it should! though it's possible i have made a mistake in there. for
the utility is probably the best place to look, again this runs on linux so it's not quite
yep, even multiple radios should be okay provided there's no multithreading.
it should be in Hz yes, you can see this in the docs
|
Thank you for the quick response. The Also thank you for warning about "experience a bit of flux". I fully anticipate that. I hope when I get my examples working they might be helpful to you while you make changes. I can setup There is an associated function for the
Also, the associated function The code is below for reference. If you know which DIOx connection should be connected for Finally, I find I need Thanks again.
|
you're on the right path.
are you building in release mode? this makes a huge difference, though rust builds can be kindof large. you may find useful guidance here or here, and it's worth noting that any
Busy is DIO0, Ready is DIO1 (and these should be at some point renamed...)
Probably could be from the prelude yeah, the |
Thank you for all your help. I have now tested with Thank you for the pointer about building in release mode for bluepill. Yes, I can fit the code on bluepill this way. I have not yet done a test to see if it actually works, but will report back when I do. A remaining question is regarding using a borrowed copy of
|
wow v exciting! what's the plan now?
unfortunately DelayMs takes |
I switched to using Regarding plans, I have revised this example so it works with multiple embedded stm hal crates and will shortly check those that I have hardware for. I am also working on an example that reads and transmits GPS and another to receive LoRa. I have a CI generated scoreboard for my examples at https://pdgilbert.github.io/eg_stm_hal/. (See If you want to put these in an I do have some other issues/questions but they are enough different that I think it is best to close this issue. |
some examples would be super neat! i wonder whether there's a standard-ish board/combination that's easy to get hold of to reproduce / use these. |
I am not aware of pre-build standard-ish boards with LoRa and GPS. So there is some wiring involved, but the pieces I am using are all pretty standard and cheap. (Roughly $5 each for the three pieces.) I am planning on documenting this more on my github site, but for an example in your crate I would put more comments in the files. The code should actually compile for many (most?) of the embedded-hal crates and, sometime, I will test with other GPS and LoRa. BTW, I just ran the GPS version of the code on battery powered blackpill stm32f411 without semihosting and it works. |
I realize this is work in progress, so maybe you are not ready for newbies like me. Don't hesitate to tell me I need to be patient, but if your direction is not consistent with what I am trying to do then it would be nice to know that I should be looking elsewhere.
I am trying to build the LoRa sending side of a sensor to base station connection. I have both sides working on R Pi with python, but would like to run at least the sending side with rust on no_std stm32xxx. So I do have a working receiving side to test against. I am currently using an RFM95 sx1276 style radio.
Should this crate work with no_std (I hope so)? There seems to be some indirect dependency on
ansi_term
,lazy_static
andtermcolor
which I think need std so I get an error about can't find crate std. I am using master branch.With no luck finding an example, I've looked at the integration test, but it uses std. Is there
another example I should be looking at?
Should the crate already work if I only have one radio, so do not have the problem described in issue Question: Integration testing example #10 ?
I think the frequency is a u32 indicating hertz but somewhere I saw something that that seemed like it might be megahertz. Megahertz would mean only some channels can be used (867.0, 868.0, 915.0). Am I correct that the frequency in hertz?
The integration test loads a configuration from a file. Thinking no_std I would like to just specify
the configuration in the code, but I cannot figure out if I should be setting this with
radio_sx127x::spi()
,Sx127x::new()
, or withlora_configure()
after I have an object. I am confused about what is intended to be the user API and what are internal utilities. A quick reaction to my attempt (code below) would be much appreciated.I am also very unsure about the hardware wiring, so I have added comments in the code. From Question: SPI settings Raspberry Pi 3 B+ Lora HAT #7 I see that "busy" should
DIO0
, I guess on a gpio pin configured aspush_pull_output
? I am also unsure about the pin for "ready". Should it be another of theDIOx
pins?Thanks very much for your work on this crate.
The text was updated successfully, but these errors were encountered: