mjhouse / ag-lcd

A rust port of the C++ LiquidCrystal library for arduino systems
GNU General Public License v3.0
17 stars 8 forks source link

Add flashable example of Arduino Uno #5

Closed vcrn closed 2 years ago

vcrn commented 2 years ago

Thank you for a great crate!

I saw in a previous issue where you were notified about this crate working on Arduino Uno that you'd like a flashable example to be added. I made a very simple Hello World, added some info in its README, and edited the README in examples/ with some info about the example(s).

Please let me know if there's something you would like to be changed in my PR, or if there's features you'd like to add to the crate which I might be able to help out with.

mjhouse commented 2 years ago

@vcrn Hey this looks great- the only thing I would say is that if you're putting the uno example in it's own subdirectory, then maybe the nano examples should be in their own directory as well. Can you run your uno example from the root directory with cargo?

vcrn commented 2 years ago

Thanks!

Having 2 subdirectories seems like a good idea. I didn't want to make a too big of a change to the structure of the project to begin with, but if I'll add more examples, it's probably for the better. That way the READMEs can be kept a bit cleaner also in case information regarding Uno and Nano diverge too much. So far, they seem to align quite nicely. I could open a new PR for it and add a new flashable Uno example at the same time (which could be some equivalent of the ones that are available for the Nano)? Or would you prefer I change the structure for this PR?

Regarding running if from root: no, I can't seem to from the crate root. I have to 'cd examples/uno' and then 'cargo run'. I could add it to the crate's Cargo.toml though to make it work (along with the ones for Nano, unless there's some command for cargo that I'm unware of which already makes this work?). That could be implemented in another PR maybe?

mjhouse commented 2 years ago

I'll make an issue to restructure the examples for the nano and another to make sure that we can run the examples from the root directory. If you want to work those or anything else, I'll keep an eye on my notifications so I don't leave you hanging with a pull request in limbo or anything.

mjhouse commented 2 years ago

Hey, thanks for the work man!

vcrn commented 2 years ago

You're welcome, and thank you again for the great crate! I'll start working on the restructuring since paths to the examples will have to be added to the Cargo.toml for them to run from root, and those will change after the restructuring.