Skip to content
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

Do you need more examples for arduino uno? #146

Open
crclark96 opened this issue Feb 26, 2021 · 9 comments
Open

Do you need more examples for arduino uno? #146

crclark96 opened this issue Feb 26, 2021 · 9 comments
Labels
documentation Documentation/Examples

Comments

@crclark96
Copy link
Contributor

I'm in an embedded software class and decided to do the assignments in Rust with the help of this crate, so I have a bunch of minimal examples doing things like reading from a DHT11 temp sensor, using a timer interrupt (which I actually sourced from your blog, so you probably have this), and I'm currently working an example with external interrupts.

I'm happy to work with you to get the source code in a state that's consistent with your other examples, but if you feel there are enough examples I'll just put them on my page (since some of them have to access registers directly since the interrupt abstraction layer isn't quite ready yet).

Let me know what you think --

@stappersg

This comment has been minimized.

@Rahix
Copy link
Owner

Rahix commented Feb 27, 2021

In my eyes, more examples is always better - they help people understand how a project is intended to be used in ways that documentation just can't explain. So I'll take everything I can get :)

We're currently doing quite big changes to avr-hal, see #130. So I think it would be best to wait until that refactor is done and then rework the examples for the new API.

@Rahix Rahix added the documentation Documentation/Examples label Feb 27, 2021
@crclark96
Copy link
Contributor Author

Great - I'll keep my eye on that issue

As an aside, some of these have ugly interrupt initialization akin to the millis() example -- is there a plan for implementing an interrupt API? I didn't see it in #130

@Rahix
Copy link
Owner

Rahix commented Mar 1, 2021

I assume by "ugly interrupt initialization" you mean that you have to write the registers directly?

Well, I do intend to add an API similar to the one for USART to all other peripheral drivers as well at some point. Or are you looking for something else?

@crclark96
Copy link
Contributor Author

"Ugly" is the wrong word -- unabstracted?

Either way, that API looks similar to what I was asking about, and I saw discussion about a timer API so that should cover everything I've implemented by hand, thanks

@oslfmt
Copy link

oslfmt commented Nov 12, 2022

Is there an example to use the LCD with Rust crate? Arduino language has a simple header file that can instantiate lcd, and python has many libraries. Was wondering if this crate has something similar or we have to do it manually?

@Rahix
Copy link
Owner

Rahix commented Nov 14, 2022

What LCD are you trying to drive, @victor-wei126? The idea in the embedded Rust community is to have driver crates for each LCD controller and those can be connected to each microcontroller HAL, including avr-hal here. So find a fitting LCD driver crate and try attaching it to the peripheral types provided from avr-hal.

Just as a guess, maybe something like this is what you need? https://crates.io/crates/hd44780-driver

Otherwise, check this list of driver crates: https://github.com/rust-embedded/awesome-embedded-rust

If you need help, let us know.

@Rahix
Copy link
Owner

Rahix commented Nov 14, 2022

(And in line with the original issue topic here, if someone wants to contribute an LCD example, please do!)

@oslfmt
Copy link

oslfmt commented Nov 29, 2022

Those crates look promising @Rahix. I will check them out. Thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation/Examples
Projects
None yet
Development

No branches or pull requests

4 participants