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

Added an HTTP example for the Galactic Unicorn #738

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ahnlak
Copy link
Contributor

@ahnlak ahnlak commented Mar 28, 2023

Inspired somewhat by #647, I've put together a basic "grab a quote from the Internet and display it on the Unicorn" type example.

I've endeavoured to keep it close in format to the other examples, and commented the code to hopefully make it intelligible to others (or at least, as intelligible as it's possible to be with lwIP code!)

You need to include -DPICO_BOARD=pico_w to cmake in order to be able to pick up the WiFI-related libraries.

You also need to include -DWIFI_SSID="ssid" and -DWIFI_PASSWORD="password" to provide suitable WiFi credentials (although I do have a functioning example of providing this through a mounted USB drive, it's ... a much bigger bit of work!)

Hopefully of some interest?!

@Gadgetoid
Copy link
Member

Of great interest, thank you!

I'm actually hoping to give both Galactic and Cosmic Unicorn the same treatment as Badger 2040 - ie: moving them and their examples to another GitHub repository where firmware, examples and documentation will be easier to find.

As such I'm not in a tremendous hurry to merge this, but it will be very valuable as a test case for the new repository.

@ahnlak
Copy link
Contributor Author

ahnlak commented Mar 29, 2023

Makes a lot of sense for the Unicorns to get the Badger treatment.

Although, on reflection this stuff is PicoW-related rather than Unicorn specific, so I'm wondering if there's a more rational place for it (and also the USB Mass Storage thing if I ever lick it into a comprehensible state!)?

@Gadgetoid
Copy link
Member

Probably wouldn't hurt you to throw it in its own repo using our Pico Boilerplate, and we can link to it from there?

If you get the FAT stuff working you can ship a .uf2 and we can link it from the product page(s) too. Since I guess that means the user can config WiFi over USB?

As much as I love contributions, stuff tends to get absolutely lost in this havoc of a repository and I'd rather projects like yours thrive and get some attention rather than die in a cold, dark corner with a billion other examples.

@ahnlak
Copy link
Contributor Author

ahnlak commented Mar 29, 2023

That's precisely what set me off down that rabbit hole, yeah - my "improved" Unicorn clock does exactly that; gives you a CONFIG.TXT to edit to get the WiFi playing nicely.

I need to turn that into boilerplate-y thing for future projects too (hmm, can boilerplates be based on boilerplates?) and it probably makes sense to roll some HTTP stuff into that given that it's all very WiFi-centric.

Will ping you when it's fit for consumption :)

@ZodiusInfuser ZodiusInfuser added enhancement New feature or request [- galactic unicorn -] https://shop.pimoroni.com/products/galactic-unicorn labels Apr 13, 2023
@kfarr
Copy link

kfarr commented Apr 17, 2023

+1 I really like the idea of moving GU + CU examples off to another repo. I have a few improvements to the cosmic_paint.py file such as displaying IP address on the device when connected (instead of just through logs) but it seems like it would just get lost in this mega repo

@ahnlak
Copy link
Contributor Author

ahnlak commented Apr 24, 2023

Quick follow-up to this; I've rebuilt this example into it's own repo at https://github.com/ahnlak-rp2040/gu-scrolling-quote - it's based off a more comrehensive PicoW boilerplate that bakes in the filesystem and a simple http(s) client :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[- galactic unicorn -] https://shop.pimoroni.com/products/galactic-unicorn enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants