This repository contains source code for the nRF91 Pizza web application which is shown in the following video. The main purpose of the application is to demonstrate how to pull data from nRF Cloud with the Device REST API.
As a developer, this means you have a quick way of displaying near-live data from your Thingy:91 in a custom interface. There is no need to write firmware or cloud code for your cellular IoT prototype.
The following quote is from the Device API Getting Started Guide:
The nRF Connect for Cloud Device API allows you to programmatically interact with, and retrieve historical information generated by, any device that you have connected to nRFCloud.com. The Device API consists of both a REST API and an MQTT API. The REST API is easier for Web engineers to understand and work with. It is designed with them in mind, and to support building custom Web applications that support IoT solutions, e.g., an admin dashboard.
Please check out these resources for more details on working with the Device API:
- Getting Started Guide in the nRF Connect for Cloud docs
- REST API Docs in the nRF Connect for Cloud docs
- Experiment with the API in Swagger UI
- Connect to any device you have running in nRF Connect for Cloud
- Read and display GPS position
- Read and display temperature
- Read and display flip data (orientation)
The relevant code for connecting to the REST API is available in cloud-api.js
. The code for parsing data is available in app.js
.
Nordic Thingy:91 Cellular IoT prototyping kit. Buy here
In order to use this web application you must first set up your Thingy:91 and connect it to nRF Connect for Cloud. Refer to the Thingy:91 Get Started Guide.
If you can see data from your Thingy:91 being published in nRF Connect for Cloud you are ready for the next steps:
- Copy your API Key from nRF Connect for Cloud - https://nrfcloud.com/#/account
- Open the live demo web app - https://nordicplayground.github.io/nrf91-pizza/
- Click the gears icon in the top right corner
- Paste the API Key
- Select your device in the dropdown menu
- Select the Order tab
- Select any Pizza
The app has only been tested on Chrome browsers in Windows and Android devices.
- Leaflet - BSD 2-Clause "Simplified" License
- jQuery - MIT License
- Bootstrap - MIT License
This application is one of several applications that has been built by developers at Nordic Semiconductor as a demo of some particular feature or use case. It has not necessarily been thoroughly tested, so there might be unknown issues. It is hence provided as-is, without any warranty. However, in the hope that it still may be useful also for others than the ones we initially wrote it for, we've chosen to distribute it here on GitHub. Please post any questions about this project on DevZone.