Skip to content

ACC-HelloWorld/1-running-the-demo-public

Repository files navigation

Running the Demo

This project is written in Python, and tested with pytest.

The assignment

After building your CLSLab:Light demo and testing it per the tutorial instructions*, edit your main.py file and replace these lines:

    my_id = hexlify(unique_id()).decode()
    my_encrypted_id = encrypt_id(my_id, verbose=True)

with:

    my_id = "<your_id_here>"
    my_encrypted_id = my_id

where <your_id_here> is the GitHub Classroom course identifier you chose. Then, edit course_identifier.py and replace the string with your course identifier. For example, if your course identifier is funky-zebra, then you would replace:

course_id = "<your_id_here>"

with

course_id="funky-zebra"

If your CLSLab:Light demo is up-and-running, the tests will pass and a full optimization campaign will run on your device.

*NOTE: Recently, HiveMQ Cloud changed such that hivemq-com-chain.der (a Certificate Authority (CA) file) is not transferrable across different broker instances. The latest hivemq-com-chain.der file from self-driving-lab-demo will be hard-coded to the self-driving-lab-demo public test credentials (i.e., what is used in Module 1 - Running the Demo). However, this assignment requires you to create your own HiveMQ Cloud broker instance, so you will need to generate a hivemq-com-chain.der file specific to your instance and upload it to your microcontroller.

Optional

You can also view the full workflow interactively. First, navigate to 4.2-paho-mqtt-colab-sdl-demo-test.ipynb and replace the string value for PICO_ID with the one corresponding to your device. For example, if you PICO_ID is a1b2c3, then you would replace PICO_ID = "test" with PICO_ID = "a1b2c3". Then, run each cell in the notebook to see the full optimization campaign, including visual comparisons between grid search, random search, and Bayesian optimization.

Setup command

pip install -r requirements.txt

Run command

pytest

Notes

For context about how or when to edit main.py, see step 14 of the build instructions

About

Autograding assignment for "running the demo" module from Hello World for Self-driving Labs [STATIC COPY]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •