A website to upload GIFs to the MXCHIP
MIT License
A website to upload GIFs to the MXCHIP
Great question - let's get started. Most importantly though, you'll need to install a few things:
NodeJS (version 8 or higher is fine).
Arduino IDE (For Windows users: For easy configuration, download the Installer instead of installing the app from the store).
ST-Link/V2 (to configure Windows USB drivers)
VS Code and extensions:
You'll also need an Azure account, if you don't have one already.
Optionally, Zadig if you're having difficulties uploading code to your device on Windows.
We're going to use IoT Hub to communicate from our website to our MXCHIP device. Follow the docs guide on how to create an IoT Hub. If you already have an IoT Hub to use, you can skip this step.
We'll need to store some credentials on your MXCHIP device so that it can connect to both IoT Hub and to your chosen WIFI.
set_wifissid
, set_wifipwd
commands to store your local Wifi settings on the device. Here's an example of a command: set_wifissid My_SSID
set_az_iothub
command with your device connection string you copied when you registered the device identity in an earlier step to store the device connection string on the device.exit
command and watch the terminal to confirm that your MXCHIP is connected successfully.You could use the commands from Azure IoT Device Workbench to provision IoTHub as well as set your device connection string. Check the above guide for details.
Our website needs to be able to see which devices are registered in your IoT Hub, and also to invoke device methods to control devices remotely. For this, we'll need a connection string for IoT Hub which has the right access policies.
Copy the connection string for that policy.
Create a .env file under the repository's server folder in Visual Studio Code. Add the connection string value you copied in the previous step with the following format.
CONNECTION_STRING=your_connection_string
We're ready to run the server!
cd server && npm install
npm start
and navigate to localhost:3000 in your favourite browserContributions are welcomed! Please open a pull request or issue and detail as much as you can your ideas for improvement.
Check out the CONTRIBUTING.md file in this repository for details.