Skip to content

NordicPlayground/nrf91-pizza

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

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:

Features

  • 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.

Requirements

Image of Thingy:91

Nordic Thingy:91 Cellular IoT prototyping kit. Buy here

How to use

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:

  1. Copy your API Key from nRF Connect for Cloud - https://nrfcloud.com/#/account
  2. Open the live demo web app - https://nordicplayground.github.io/nrf91-pizza/
  3. Click the gears icon in the top right corner
  4. Paste the API Key
  5. Select your device in the dropdown menu
  6. Select the Order tab
  7. Select any Pizza

Animation of nRF Pizza setup

Limitations

The app has only been tested on Chrome browsers in Windows and Android devices.

Third-party licenses

A note on support

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.