Outcome
A dimmable LED that can be turned on/off by pushbutton or through the Particle Cloud API.
I initially tried to put together all the code and circuit at once. It didn't work, and was not immediately clear what was going wrong even after some debugging (turns out I just forgot to connect my potentiometer to power). I scaled back to the basic pushbutton-LED demo code, then added back the potentiometer code and finally realized my wiring issue.
I wanted to play with exposing a Particle function, and initially forgot to return an int. I also realized it sometimes takes a few refreshes to show up on the console.
I wanted to get set up with Particle in VSCode + using the CLI, which took way longer than I expected! Hopefully now that it's set up, things will go more smoothly.
I don't completely understand the difference between POST and the cURL commands. Is it just PHP vs cURL to make the REST request? I just used the Particle web console to control the LED, but I'd like to understand how to interact with the API directly too.
You can upload files of up to 20MB using this form.