This repo is deprecated and will no longer be maintained. Please visit Microchip's AVR and PIC git resources for up-to-date information: https://github.com/microchip-pic-avr-solutions
Information below is for archival purposes only, and may be removed at any point.
A rapid deployment tool for getting your AVR-IoT data on the cloud. Powered by Leverege.
Talk to an Expert »
Want to see how easy IoT can be? Check out our blog post with video walkthroughs of the Quick Start!
(Links will open in this window. Shift+click, command+click, or middle mouse click to open in new window or tab.)
- Set up your GCP and Firebase Projects
- Run the Quickstart Script
- Add your devices public key to your IoT Core Registry
- Update your AVR-IoT device firmware
This repository contains resources for quickly connecting your AVR-IoT device to your own Google Project and deploying a live UI to Firebase.
Following this guide, you will clone this repo into your Google Cloud project, and run a script that:
- enables Cloud Functions, Cloud IoT Core, and Pub/Sub,
- creates an
avr-iot
Pub/Sub topic, - creates an IoT registry (default name:
AVR-IOT
, configurable in the script), - adds your device's UID to the registry,
- builds and deploys a Cloud Function to route Pub/Sub messages to your Firebase project, and
- builds and deploys a UI to firebase.
After running the quick script, you'll need to add your device's secure pubkey to the device's entry in your IoT core registry and update the firmware on your device using Atmel START and Atmel Studio.
The quickstart requires that you have a Firebase project connected to a GCP project with billing enabled.
-
Create (or select an existing) GCP project.
-
Enable billing for the project.
-
Launch the Firebase Console.
-
Select 'Add project'.
-
In the Project Name field, select the GCP project you created or selected above.
-
Click 'Add Firebase'.
-
Open Cloud Shell from your project.
-
In the shell, run
git clone https://github.com/Leverege/microchip-avr-iot.git && cd microchip-avr-iot/setup && bash setup.sh
to clone this repo, enter the newly created directory, and run the quickstart script.
-
You will need to provide firebase authentication. To do this, copy the authentication URL provided in the shell console, and paste it into a new browser window. Then, log in on that page, authorize the app, and copy the security key. Paste the security key into the shell at the prompt and hit return.
-
At the prompt, enter your AVR-IoT device's UID. Your device's UID is the last portion of the url you see after launching CLICK-ME.HTM from the device.
-
If you would like to customize your IOT Core registry name, you may do so at the IoT core registry name prompt.
IoT core registry names must start with a letter, use only letters, numbers, hyphens, and the following characters:
+ . % _ ~
-
The setup script will run for several minutes. The setup script will:
- Enable Cloud Functions, IoT Core, and Pub Sub in your GCP project
- Create an IoT Core registry called AVR-IOT and register your device
- Install, build, and deploy Cloud Functions and the UI
-
Make sure your device is connected to your computer via USB.
-
Open your IoT Core registry management page, and select the AVR-IOT registry.
-
Click on your device's UID in the list.
Because registry entries must begin with a letter your device UID will be prefixed with a 'd'. To search for your device by uid, you must enter 'd<your_device_id>' in the search box.
-
Click the Add public key button.
-
Select 'Upload' under the input method, and ES256 (not ES256_X509) as the public key format. Then click the Browse button.
-
In the upload window, navigate to the CURIOSITY drive, then select PUBKEY.TXT and click add to upload it.
-
Navigate to the Atmel START Rapid Development Tool. Please note that this software is Windows only.
-
Click the Browse Example button.
-
Search for ATMEGA4808 and select AVR IoT WG Sensor Node.
-
Click on Open Example.
-
Scroll down to the Cloud Configuration section, and enter your GCP Project ID and Registry ID.
-
Select the "WIFI_0" module under "My Software Components" to display the WiFi configuration settings.
-
Under the WLAN Configuration section, enter in your WiFi credentials. Note: the network must be 2.4Ghz as the device cannot connect to 5.0 Ghz networks.
-
Switch to the Export Project tab and click on Download Pack.
-
Open the .atzip file in Atmel Studio and select Build Solution under the Build menu bar (or hit F7). Atmel Studio will generate a .hex file in the folder where you saved your project.
By default, it will be located in ..\Atmel_Studio\7.0\<YourProjectName>\<YourProjectName>\Debug
-
Drag and drop the .hex project file into your CURIOSITY drive.
And that's it! If you've edited your device with the Atmel START rapid development tool, you should see live data flowing to your new Firebase app at <your-project-id>.firebaseapp.com/device/<your-device-uid>.
Want to build something bigger? We can help you scale your projects into solutions. Talk to an IoT expert.
Whether you're a Fortune 500 company or startup, transforming your current business or creating entirely new businesses, it takes a team with deep experience across verticals and use cases to turn your IoT prototype into an IoT product.