-
Notifications
You must be signed in to change notification settings - Fork 9
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
Pico W setup with Ubuntu #194
Comments
Good to know about the Linux version! I'll make sure to add a note of that somewhere.
The MongoDB variables can be safely set to empty strings; however, you'll need to use the default HiveMQ env variables (https://github.com/sparks-baird/self-driving-lab-demo/blob/src/public_mqtt_sdl_demo/sample_secrets.py#L12-L14) or create your own HiveMQ instance. Originally I had the MQTT communication over a (free) public, unencrypted channel and later migrated that to a (free) private, encrypted channel. I shared the default authentication details publicly but created instructions for making your own instance in these build instructions (stripped of figures per journal submission requirements). The manuscript was recently accepted to Star Protocols 😁 I'll post the link to the article when it's available, and I'll update the ChemRxiv preprint soon. I have some discussions around these topics at https://github.com/sparks-baird/self-driving-lab-demo/discussions/categories/data-and-access-management. For my benefit, what resources were you looking at? At the time I made the YouTube video, I hadn't implemented this feature yet, and I don't think I updated the hackathon instructions either. I'll see if I can get a note added at the relevant point in the video, and I'll take a look at the hackathon instructions again.
Awesome! I'm excited to hear how that goes, and you're welcome :) Thanks for giving this a shot! |
Lmk if you come up with any kid-friendly demos :) I picture fruit coming into play 🟠 🍌 🍓 Also, since the retries for logging to MongoDB can add ~10-15 seconds between iterations (always maxes out on retries if MongoDB credentials are empty/incorrect), you may want to set Taking from the Colab tutorial, this would look like: from uuid import uuid4 # universally unique identifier
from self_driving_lab_demo import (
SelfDrivingLabDemoLight,
mqtt_observe_sensor_data,
get_paho_client,
)
PICO_ID = "test" # @param {type:"string"}
SESSION_ID = str(uuid4()) # random session ID
print(f"session ID: {SESSION_ID}")
# instantiate client once and reuse (to avoid opening too many connections)
client = get_paho_client(f"sdl-demo/picow/{PICO_ID}/as7341/")
sdl = SelfDrivingLabDemoLight(
autoload=True, # perform target data experiment automatically
observe_sensor_data_fn=mqtt_observe_sensor_data, # (default)
observe_sensor_data_kwargs=dict(
pico_id=PICO_ID, session_id=SESSION_ID, client=client, mongodb=False # <--- EDIT
),
) Just gave it a try, and it seems ok 👍 |
Thanks for the feedback! Will try things out.
I was mostly going through the README file and YouTube video for setup, but planning to go through the documentation preprint more closely now. |
Great, lmk! And thanks, I'll try to get the YouTube video up-to-date. |
@sgbaird I was final able to find time this weekend to assemble my kit and now I'm working on the micropython. I had to follow the instruction here since I couldn't see how to install the micropython firmware in the linux version of Thonny. I assigned the WiFi values in
secrets.py
and uploaded it to the Pico W but I'm getting the following issue:Seems to be connection related. As a note, I set the MongoDB and HiveMQ env variables empty strings.
Any help is much appreciated. hoping to play around with this with my kids over the weekend. Thanks again for this awesome DYI project.
The text was updated successfully, but these errors were encountered: