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

Raspberry Pi example #48

Open
jamwaffles opened this issue Apr 8, 2018 · 16 comments
Open

Raspberry Pi example #48

jamwaffles opened this issue Apr 8, 2018 · 16 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@jamwaffles
Copy link
Collaborator

This should be a good test to exercise the driver. There's still the outstanding question of how we organise examples but having a variety should help people get up and running quickly.

@jamwaffles jamwaffles added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Apr 8, 2018
@fmckeogh
Copy link

Done :)

Only thrown together very quickly, but does demonstrate some range of the libraries capabilities as well as differences between I2C and SPI interfaces.

Obviously, I'd like to write some kind of guide (pinouts, and detailed code explanation), but was unsure of how you would like this to be integrated into the project.

img_1201

img_1204

@jamwaffles
Copy link
Collaborator Author

That's awesome! A section in the readme about Raspi support with a quick getting started guide, small code sample and a link to your examples repo and/or a blog post if you decide to write one would be useful.

What do you think about including the examples in this repo, with a comment stating they might not build out of the box with cargo run --example <name> like the others? It would keep them in the same place at the cost of development ease. How hard would it be to get them working with cargo run --example?

@fmckeogh
Copy link

fmckeogh commented Aug 15, 2018

I tried that, and even though I think having different build flags and using cargo build --example pi_graphics_spi --target=armv7-unknown-linux-musleabihf would work, the fact that examples can't have their own dependencies will break everything. Some of the cortex-m crates aren't happy with the Pi target, and one of the Pi dependencies requires std. It's a shame cause it really would be the best option.

What do you think about using a workspace to isolate dependencies? I think just a separate repository might be easiest, but it is an option.

@jamwaffles
Copy link
Collaborator Author

I like the idea of a workspace. It should be possible to test that the RPi examples at least build which is much easier when that code is part of the same project. I'd suggest two sub-folders; ssd1306 and examples-rpi. The Cortex M examples might move into their own workspace later, but that's out of scope for this stuff. Do you have any objections to moving your example code into this repo?

@fmckeogh
Copy link

fmckeogh commented Aug 16, 2018

Sounds great!

None at all, I'll have a PR from my fork soon :)

@jamwaffles
Copy link
Collaborator Author

Beaut, thank you!

@chux0519
Copy link

@Chocol4te 's example doesn't work now.
I modified it a little bit, and using docker image to cross compile.
here is the working example for now.

@jamwaffles
Copy link
Collaborator Author

Thanks for the fix!

@PatrickLang
Copy link

@chux0519 @Chocol4te - are either of you planning to submit this? I did a bit more cleanup https://github.com/PatrickLang/raspi-oled/tree/ctrlc. If you're not planning to open a PR, I'm happy to help. From a legal standpoint it would be best if you could add a license file to your repos so I can do this cleanly as a merge and you'll get credit in the history. Otherwise I can write a sample from scratch and submit it separately.

@chux0519
Copy link

chux0519 commented Aug 4, 2020

@PatrickLang I've added a license to the repo, and for me, feel free to modify that and file a PR

@PatrickLang PatrickLang mentioned this issue Aug 4, 2020
8 tasks
@fmckeogh
Copy link

fmckeogh commented Aug 4, 2020

Oops sorry! Which license would be best? The examples I wrote are now 2 years old so do you think its even worth adding mine, especially when https://github.com/chux0519/raspi-oled and https://github.com/PatrickLang/raspi-oled/tree/ctrlc seem a lot more complete?

@ukscone
Copy link

ukscone commented Sep 26, 2020

I tried to build the example on a raspberry pi and it fails
pi@raspberrypi:~/ssd1306/examples/raspi $ cargo clean pi@raspberrypi:~/ssd1306/examples/raspi $ cargo build Compiling void v1.0.2 error[E0463]: can't find crate for std| = note: thethumbv7m-none-eabi` target may not be installed

error: aborting due to previous error

For more information about this error, try rustc --explain E0463.
error: could not compile void.

To learn more, run the command again with --verbose.
pi@raspberrypi:~/ssd1306/examples/raspi $

i've tried everything I can think of (not a lot as i'm a Rust newbie)

can anyone give me any hints on how to build this ON a raspberry pi please`

@ukscone
Copy link

ukscone commented Sep 28, 2020

managed to find a solution. i have to put the target on the build or run command otherwise it tries to use the thumbv7m-none-eabi toolchain rather than the default toolchain for some reason.

@btielen btielen mentioned this issue Nov 9, 2021
6 tasks
@btielen
Copy link

btielen commented Nov 9, 2021

I opened a new PR with a simple text example

@mgomez0
Copy link

mgomez0 commented May 31, 2023

Would adding an example for a Raspberry Pi Pico be helpful? They would likely be very similar to the Blue Pill examples, but there are enough differences to provide a faster starting point for people using that board. I have a simple "terminal mode" example running now, printing characters to the display.

@mgomez0
Copy link

mgomez0 commented May 31, 2023

Ah, I just saw the issue that argues against platform-specific examples in the repo 😅 well, I'm going to keep hacking with this driver on the RPi Pico, and I'm more than willing to open PRs and fix issues as I find them. Thanks for your hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants