26
Application Note R11AN0077EU0100 Rev.1.00 Page 1 of 24 Feb 14, 2017 Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo Introduction This application note outlines the process of setting up the Renesas IoT Sandbox account, how to connect the S3A7 IoT Fast Prototyping Kit to that account with the Smart Chef demo, and how to run the demo. Following are the resources used in this document: Synergy S3A7 IoT Fast Prototyping Kit Laptop with internet connection and browser Android and/or iOS smart device Wi-Fi connectivity to Internet (Router/Gateway/Access Point) e 2 studio (version: 5.2.0.022) and SSP 1.1.3. Contents S3A7 IoT Fast Prototyping Kit Overview ...................................................................... 2 Board setup .................................................................................................................... 2 S3A7 Kit Activation ........................................................................................................ 5 Provisioning the Kit........................................................................................................ 9 Notifications Set Up ..................................................................................................... 12 Provisioning the Mobile App ....................................................................................... 14 Workflow usage ............................................................................................................ 16 Project File Structure ................................................................................................... 20 Code Architecture (API and SSP components usage) ............................................... 21 9.1 SSP component ............................................................................................................................ 23 Website and Support ........................................................................................................... 24 R11AN0077EU0100 Rev.1.00 Feb 14, 2017

IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Application Note

R11AN0077EU0100 Rev.1.00 Page 1 of 24 Feb 14, 2017

Renesas Synergy™ Platform

IoT Fast Prototyping Kit Smart Chef Demo Introduction This application note outlines the process of setting up the Renesas IoT Sandbox account, how to connect the S3A7 IoT Fast Prototyping Kit to that account with the Smart Chef demo, and how to run the demo.

Following are the resources used in this document:

Synergy S3A7 IoT Fast Prototyping Kit Laptop with internet connection and browser Android and/or iOS smart device Wi-Fi connectivity to Internet (Router/Gateway/Access Point) e2 studio (version: 5.2.0.022) and SSP 1.1.3.

Contents

S3A7 IoT Fast Prototyping Kit Overview ...................................................................... 2

Board setup .................................................................................................................... 2

S3A7 Kit Activation ........................................................................................................ 5

Provisioning the Kit........................................................................................................ 9

Notifications Set Up ..................................................................................................... 12

Provisioning the Mobile App ....................................................................................... 14

Workflow usage ............................................................................................................ 16

Project File Structure ................................................................................................... 20

Code Architecture (API and SSP components usage) ............................................... 21 9.1 SSP component ............................................................................................................................ 23

Website and Support ........................................................................................................... 24

R11AN0077EU0100 Rev.1.00

Feb 14, 2017

Page 2: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 2 of 24 Feb 14, 2017

S3A7 IoT Fast Prototyping Kit Overview The S3A7 IoT Fast Prototyping Kit features an LCD display with Touch screen, a WiFi Communication module, PMOD and Grove expansion options, and USB host and device connectors. It is powered by the Renesas Synergy S3 family MCU. The main features of the kit are:

• Qualcomm GT202 WiFi • New Haven 2.4” Cap Touch Display • AMS environment sensor PMOD Module • Boucsh BMC 150 6-Axis eCompass PMOD module • 4 PMOD and 4 Grove connectors • J-Link Lite Cortex-M 9-pin debugger • Battery, cable, and USB storage drive • Pre-loaded Smart Chef demo.

Figure 1 IoT Fast Prototyping Kit

Board setup The Smart Chef demo uses both the AMS and the Bosch sensor from the kit. The following procedure shows how to connect the sensor module to the S3A7 board.

• Setting up the AMS connector Connect the Grove cable pins to the AMS sensor, as shown in Figure 2. Connect the white to pin 2, yellow to pin 3, black to pin 5, and red to pin 6 of the PMOD connector. Connect the AMS sensor to J18 Grove connector on the MCU main board, through the Grove cable. A slight force might be required to fit the cable to the connector.

Grove connector

cable

USB battery

and cable

AMS environment

sensor

Bosch BMC 150

6-axis motion

USB thumb drive

Getting started URL

card

SEGGER J-Link Lite Cortex-M 9-

pin debugger

Main board with display

Page 3: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 3 of 24 Feb 14, 2017

Figure 2 AMS sensor with pin color codes, top view, and bottom view

• Setting up the Motion Sensor module Connect the BMC 150 sensor module to PMOD connector J5. Make sure that you have the J1 jumper short and J2 jumper open, in the module, as seen in Figure 3.

Figure 3 Motion sensor module

• Powering up the board

Connect the Micro USB end of the power USB cable (white, which came out of small white box with the USB battery) to the S3A7 board, J1 connector. Do not plug the other end of the cable to your laptop yet. The complete setup is as seen in Figure 4.

J1 is short J2 is Open

Page 4: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 4 of 24 Feb 14, 2017

Figure 4 Complete setup

AMS Module

BMC-150 Module

Micro USB Type-B end of supplied cable

J18 Grove Connector

J5 PMOD Connector

J1 Micro-USB Power Connector

RESET Button

Page 5: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 5 of 24 Feb 14, 2017

S3A7 Kit Activation The activation process is as follows:

• Visit https://www.renesas.com/en-us/solutions/proposal/iot-sandbox.html, and complete the registration process to create a Renesas IoT Sandbox account.

Figure 5 Creating a sandbox account

Page 6: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 6 of 24 Feb 14, 2017

• Click on the Get started with the kit here link.

Figure 6 Getting started with the kit

You should be on the page with several available demo tutorials. Find Smart Chef Demo tutorial section and Click on the Quick Start Guide link. You can also open this page directly at the URL http://renesas-blog.mediumone.com/renesas-s3a7-fast-iot-prototyping-kit-with-smart-chef-demo-quick-start-guide. The page layout should be as shown in Figure 7.

Page 7: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 7 of 24 Feb 14, 2017

Figure 7 Sandbox tutorials

• Scroll down to STEP 2 of the tutorial. Click the Click here to activate the kit link.

Figure 8 Step 2 view

• You will see the registration form with profile information, email and captcha as seen in Figure 9. Fill in all the information, and press Activate. Note that project name has to be unique. There might be a situation where activate button never gets enabled. Refer to known issue # Error! Reference source not found. & Error! Reference source not found. on this.

Figure 9 Registration form

• Wait to receive emails in your Inbox. If you are registering for the first time, Renesas IoT Sandbox will also create your user account, your project, and project user. If you have already registered using the email provided, a project and project user are added to your existing account. Based on the situation, you will receive either 2 or 3 emails, from Renesas IoT Sandbox. If you have previously created a mediumone.com account, it is not available on Renesas IoT Sandbox.

Page 8: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 8 of 24 Feb 14, 2017

• The email titled “Your S3A7 Smart Chef kit is activated!” should contain the following credentials: Project Name: <Your Project Name>

For the board

Project MQTT ID: <Unique Project MQTT ID>

User MQTT ID: <User MQTT ID>

API Key: <A very long string of letters and numbers>

API Password: <system-generated password>

For the mobile App

API Key: <A very long string of letters and numbers>

Login: <user name for the project. Default is ‘device’>

Password: <system-generated password for the user>

The password for both the board and mobile app is same. However, the board uses the user’s MQTT ID, while the mobile app uses the username. You can modify the password through Renesas IoT Sandbox later.

• Log in to your Renesas IoT Sandbox account at the URL, https://renesas-na-sandbox.mediumone.com/login. If this is your first time activating Renesas IoT Sandbox, you can also follow the URL in the email titled “Welcome to Renesas IoT Sandbox!” Verify that your username and password work.

Figure 10 Renesas IoT Sandbox login

Make sure that you have selected your project name on the dashboard, as provided during registration.

Make sure you have selected correct project

here

Page 9: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 9 of 24 Feb 14, 2017

Provisioning the Kit The following four steps are needed for provisioning the board:

1. Switch the Kit into Access-Point (AP) mode. 2. Connect to Kit’s AP and browse to the provisioning URL. 3. Provide and save the configuration parameters. 4. Restart the kit, and let it connect to the internet.

The steps are as follows:

• Power on your kit by plugging the Type-A end of the power-USB cable (white) to your laptop. If you have your kit on, press the Reset button. See the message on the display screen as shown in Figure 11.

Figure 11 Message on display screen

Page 10: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 10 of 24 Feb 14, 2017

• Switch to setup mode by touching the blue button on your kit display within 10 seconds. If you missed the 10 second window, just reset the kit again to see the same message. Once touched, your kit should go into AP-mode and display its own unique SSID and Key on the top-left corner, as seen in Figure 12. The format of the SSID is iot-wifi-<xyzabc>. The second line of the screen displays the unique Key to connect to this AP. In AP-mode, your kit also broadcasts the SSID for easy search. Make sure you can see and read these two lines.

Figure 12 SSID and Key display

Page 11: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 11 of 24 Feb 14, 2017

• Connect to your Kit using your MacBook or smart device. Disconnect your MacBook or device from the existing Wi-Fi network and temporarily connect it to your kit’s AP. Find your kit’s SSID (line 1 on Kit’s screen) in the available networks, and connect to it by providing the Key that is displayed on your kit’s screen line 2. Note that your key is case-sensitive. Also make sure that your MacBook or smart device is within 10 feet distance from your kit, at this point.

• Once your device or MacBook is connected to your kit’s AP, open a browser on your connected MacBook or smart Device, and browse to http://192.168.3.1 to see a web-page similar to Figure 13.

Figure 13 S3A7 Kit Configuration page

• At this point you are about to configure your kit. You need to tell your kit which Wi-Fi network to connect to, when not in AP-mode. Following is an example on how to configure for SSID “iot:” Wifi Nework SSID: iot Authentication Mode: Select WPA2 Wifi Password: sandbox123 The credentials listed above let your kit connect to your local Wi-Fi router, and that router allows your kit’s network traffic to reach Renesas IoT Sandbox. This SSID is not broadcast.

• Provide the rest of the credentials from the activation email. You can use copy-paste to enter the credentials from the email to this form. If you are using a mobile device, it might be easier to have access to the activation email, at this point. Press the Connect button. The browser on your device or MacBook might show an error page. However, your kit’s display should show a success message. Make sure that your kit is within 30 feet distance from the Wi-Fi router. Reset the Kit, by pressing the Reset button.

• Wait for about two minutes for your kit to connect. Your kit will first try to connect to the Wi-Fi router. Then it will try to connect to Renesas IoT Sandbox’s MQTT server. Once all these connections are established, the local weather will show up on your kit’s display. If you do not see the local weather after about five minutes, there may be an error in your configuration.

Find these keys in activation email, under “For the board” section

Page 12: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 12 of 24 Feb 14, 2017

Figure 14 Display after successful connection

Note that your MacBook or smart device is no longer connected to your kit’s AP. This is expected and correct. In fact, this is the reason that the browser on your device shows a ‘not-connected’ or ‘unreachable host’ warning. Your kit is not in AP-mode now.

Notifications Set Up This section shows how to setup the email and phone to receive notifications from the Renesas IoT Sandbox using the following steps.

• Log on to Renesas IoT Sandbox, if not already logged on, and browse to the dashboard. You should be able to see some events being logged on the dashboard. The dashboard view should resemble Figure 15.

Page 13: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 13 of 24 Feb 14, 2017

A

Figure 15 Setting up notifications

Real Time Event Data

Last Value Table

User Input

Real Time Gauge

Add Widget

Page 14: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 14 of 24 Feb 14, 2017

• Provide your email and phone number in the ‘User Input’ section. Make sure to press Send Event button for each of these. These events will save your notification configurations for your project.

>

Figure 16 User input section

• Restart your kit to see if you get an email and/or SMS or text notification.

Provisioning the Mobile App This section shows how to install and provision the accompanying mobile app for Renesas IoT Sandbox. This mobile app is available only for Android and iOS. WinMo, BB10, and other platforms are not supported.

Provide your email and press Send Event

Provide your phone and press Send Event

Page 15: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 15 of 24 Feb 14, 2017

• Browse to http://renesas-docs.mediumone.com/?mobile from your smart device, and select your respective platform (Android or iOS). Alternately, you can search for IOT Controller mobile app developed by Medium One Inc. on Google Play or Apple AppStore. A sample search on an iOS device is shown in Figure 17.

Figure 17 IoT Controller App sample search

• Install and launch the mobile app. Allow the IoT Controller app to enable push notifications. • You should be able to see the main app view with few or no profiles. The screen should look like Figure 18.

Figure 18 Main app view

• On the top right hand corner, tap on the blue ‘+’ button, to add a new profile.

Figure 19 Profile view

Search term ‘iot controller’

Look for this app icon, in the search

results

Make sure that the app is provided by Medium One, Inc.

App preview has these graphics, the

time of this lab documentation

Page 16: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 16 of 24 Feb 14, 2017

• Tap on the new profile. You should see API Settings popup on the next screen, as shown in Figure 20. Alternately you can always bring this pop-up by pressing the API Login button on the top right corner of profile screen.

Figure 20 API Settings screen

• Provide the credentials received in the activation email, under For the Mobile App section. Make sure that you select Renesas as your platform on this popup.

• Tap on Done button to close the popup • Restart your kit to see if you get a push notification on your app, for successful completion.

Workflow Usage The Smart Chef IoT demo comes with over 20 pre-built workflows for retrieving and analyzing data from multiple sensors such as air quality, temperature, humidity, and accelerometer sensors, as well as using the GPS sensor for geolocation and local weather.

A Workflow is a python-based application that is triggered by events from the board, mobile app, or a timer. These workflows are free and available to you to build your IoT solution; visit the documentation page to learn more about Workflows.

Various workflows provided with the Smart Chef IoT demo are shown in Table 1.

Table 1 Smart Chef IoT demo workflows

Make Sure Renesas is

selected on this control

You can always open these

settings, by taping API Login button

Page 17: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 17 of 24 Feb 14, 2017

Workflow Description Triggered By Outputs Air Quality Sampling

Requests air quality (AMS) sensor reading from the board

• Every 10 mins • sensor_read.air_quality • raw.connected

Air Quality Processing

Decodes the air quality reading from the sensor.

• raw.air_quality • processed.air_quality

GPS PMOD Sampling

Requests GPS sensor reading from board.

• Every 10 mins • sensor_read.gps • raw.connected

GPS Processing Decodes the GPS sensor reading to geopoint format.

• raw.gps-module • processed.geopoint

Temperature and Humidity Sampling

Requests temperature and humidity (AMS) sensor readings from the board.

• Every 10 mins • sensor_read.humidity • sensor_read.temperature • raw.connected

Temperature and Humidity Processing

Converts the temperature and humidity readings to a readable format.

• raw.temp_and_humidity • processed.temperature • processed.humidity

Process Sensor Rules

Processes sensor responses and evaluates against the rules set in the recipe.

• processed.air_quality • processed.temperature • processed.humidity • processed.proximity • processed.vibration • processed.temp • processed.touched • processed.next_step

• notifications.message • notifications.screen • notifications.push • notifications.line • processed.touched • recipes.start

Update Display Updates board display. • geo_location.location.timezone

• raw.kit_version • raw.ip_address • raw.lan_address • weather.temp • weather.humidity • weather.condition • raw.ssp_version_code • raw.test

Send Notifications

Monitors workflow notifications and sends Email, SMS, Push, and Display notifications.

• notifications.message • raw.FCM_token

Select Recipe Starts the recipe based on sending the ‘select’ event to the recipes stream.

• recipes.select • notifications.push • notifications.message • notifications.sms • notifications.email • notifications.screen • notifications.clear_screen • notifications.line • recipes.start

Page 18: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 18 of 24 Feb 14, 2017

Recipe Flow Requests the sensor data corresponding to each step of the recipe based on a timer.

• Every 1 min • recipes.start

• sensor_read.air_quality • sensor_read.color • sensor_read.gps • sensor_read.humidity • sensor_read.lightning • sensor_read.proximity • sensor_read.temp • sensor_read.temperature • sensor_read.touched • sensor_read.vibration • notifications.push • notifications.message • notifications.sms • notifications.email • notifications.screen • notifications.clear_screen • notifications.line

Set Target Temperature

Prints the target temperature to the display.

• raw.set_temperature • notifications.message • notifications.screen • notifications.line

Get Weather Request the current weather information based the IP address of the board, generating a personalized notification based on the weather.

• raw.ip_address • notifications.push • notifications.message • notifications.sms • notifications.email • notifications.screen • notifications.line • weather.{} (see Weather

docs) IP and Location Monitoring

Gets city and state base from IP address of the board.

• raw.ip_address • geo_location.{} (see Geolocation docs)

• notifications.message • notifications.screen • notifications.line

GPS Mobile to BBQ Distance

Calculates the distance between the GPS, phone, and BBQ. Generates notification messages if you are in or out of range.

• raw.myGPS.device_location • processed.distance_to_bbq

• notifications.message • notifications.sms • notifications.email • notifications.push

Color and Proximity Sampling

Requests color and proximity (AMS) sensor reading from the board.

• Every 10 mins • sensor_read.color • sensor_read.proximity • raw.connected

Color Processing

Decodes the color sensor reading to RGB and alpha.

• raw.color • processed.alpha • processed.red • processed.green • processed.blue

Proximity Processing

Decodes the proximity sensor reading. Note: the higher the proximity reading, the closer the object.

• raw.proximity • processed.proximity

Page 19: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 19 of 24 Feb 14, 2017

Detect Vibration Impact

Sends a notification when a high vibration level is detected.

• raw.x_max • raw.y_max • raw.z_max

• notifications.message • notifications.sms • notifications.email • notifications.push • notifications.board

Set Vibration Aggregate Window

Specifies the vibration aggregate window size. The frequency it should transmit to Medium One, and the board will receive this configuration once upon reboot.

• raw.connected

Monitor BBQ GPS

Monitors the GPS of the BBQ (if the GPS PMOD is connected) and sends notification if it is moved > 100m.

• processed.geopoint • notifications.message • notifications.sms • notifications.email • notifications.push

Update Settings Updates user settings such as email and phone number by sending an event to the settings stream with the relevant keys.

• settings.device.ip • settings.device.name • settings.project_name • settings.sensors • settings.user.email • settings.user.name • settings.user.phone

Detect BBQ Offline

Detects if board goes offline for more than 15 minutes and sends a notification. Another notification is sent when board is back online.

• Every 10 mins • raw.connected

• notifications.message • notifications.sms • notifications.email • notifications.push

Store Recipe Steps

Saves the last step of the recipe.

• recipes.step

Processed Touch

Sends a notification when you touch the screen, along with the x,y coordinates.

• raw.touched • raw.x • raw.y

• notifications.message • notifications.sms • notifications.email • notifications.push • processed.touched

Page 20: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 20 of 24 Feb 14, 2017

Project File Structure The project file includes following folder and files shown in Figure 21.

Figure 21 Project file structure

Page 21: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 21 of 24 Feb 14, 2017

• WiFi/ include/

• sf_wifi_api.h • sf_wifi_gt202.h • sf_wifi_gt202_cfg.h • sf_wifi_nsal_api.h • sf_wifi_nsal_nx.h • sf_wifi_nsal_nx_cfg.h • wifi_common_data.h

lib/ • libWiFi.a

• m1/ libcloud-driver.a libm1.a m1_agent.h m1_cloud_driver.h

• src/ LCD/

• SplashScreen.c • ascii.c • ascii.h • bsp_exbus.c • html.c • synergy_graphics_driver_565rgb.c • synergy_graphics_driver_565rgb.h

gui_thread_entry.c hal_entry.c lcd_display_api.h m1.h net_thread_entry.c sensor_thread_entry.c usb_desc.c usb_device_thread_entry.c vibration_detection_thread_entry.c

The WiFi/ and m1/ directories contain pre-built libraries used in the Smart Chef project. WiFi/lib/libWiFi.a is a pre-built library providing WiFi framework support for the IoT Enabler Kit, and WiFi/include/ contains the corresponding header files for the WiFi library. m1/libm1.a is the M1 VSA library with corresponding header file m1/m1_agent.h. The library m1/libcloud-driver.a provides the functionality to interpret and process cloud driver messages, including communicating with peripherals. m1/m1_cloud_driver.h is the header file for the cloud driver library. The src/ directory contains the main application source code. src/LCD/ contains code specific to supporting the LCD panel on the IoT Enabler Kit. The project include paths will contain WiFi/include/, m1/, src/, and src/LCD/, in addition to the standard include paths. The project library paths will contain WiFi/lib/ and m1/, in addition to the standard library paths.

Code Architecture (API and SSP components usage) The thread architecture of the Smart Chef demo code is shown in Figure 22.

Page 22: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 22 of 24 Feb 14, 2017

Figure 22 Thread architecture

• Net Thread It initializes the network interface, then enters either provisioning or normal mode. In provisioning mode, it launches HTTP server and stores credentials to data-flash. In normal mode, it reads credentials from data-flash and connects to the cloud using M1 VSA.

• GUI Thread It initializes the LCD panel, displays initial sequence of images, communicates provisioning mode selection to other threads via global int provisioning, blocks other threads until provisioning mode selection is complete via g_provision_lock events flag group, and listens infinitely to the message framework g_sf_message0 for touch events and text display commands.

• Sensor Thread It initializes the comms framework (UART) and pre-configured I2C devices, infinitely waits on tx queue for cloud driver messages and processes them using the M1 Synergy Cloud Driver library, freeing the message buffer afterward.

• Vibration Thread It begins execution after being resumed by net_thread, after successful connection to the cloud, configures the accelerometer. Acceletrometer can be PmodACL2 or BMC150 (#define BMC150). If BMC150 and I2C_VIBRATION is defined, it uses the pre-configured I2C device g_sf_i2c_device4. Otherwise, it uses the pre-configured SPI device g_sf_spi_device0. It infinitely samples x, y, and z acceleration values and builds the following aggregates for each over sample_period time:

Page 23: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 23 of 24 Feb 14, 2017

Min Max Average Number of zero (avergae) crossings in the last period. The aggregates are sent to the cloud every sample_period. It also calculates the minimum, maximum, and average acceleration magnitude, but does not send to the cloud.

• USB Thread It initializes the FX system first, waits for g_provision_lock events flag group to indicate that the WiFi provisioning was not selected, then initializes the UX system and configures the USB stack to operate in device mode. It infinitely waits for the provisioning text file to be created, and then writes the provisioning information to data flash. After writing provisioning information to data flash, it infinitely sleeps. If the provisioning text file does not contain the required content, the information is not written to data flash.

9.1 SSP component Figure 23 shows the SSP component usage in the demo code.

Figure 23 SSP component usage in demo code

Page 24: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Renesas Synergy™ Platform IoT Fast Prototyping Kit Smart Chef Demo

R11AN0077EU0100 Rev.1.00 Page 24 of 24 Feb 14, 2017

Website and Support Support: https://synergygallery.renesas.com/support

Technical Contact Details:

America: https://renesas.zendesk.com/anonymous_requests/new Europe: https://www.renesas.com/en-eu/support/contact.html Japan: https://www.renesas.com/ja-jp/support/contact.html

All trademarks and registered trademarks are the property of their respective owners.

Page 25: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Revision History

Rev. Date Description Page Summary

Rev.1.00 Feb 14, 2017 - Initial version

Page 26: IoT Fast Prototyping Kit Smart Chef Demo - Application Projectcaxapa.ru/.../r11an0077eu0100-synergy-smart-chef-demo.pdf · 2020-02-17 · IoT Fast Prototyping Kit Smart Chef Demo

Notice1. Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples. You are fully responsible for

the incorporation or any other use of the circuits, software, and information in the design of your product or system. Renesas Electronics disclaims any and all liability for any losses and damages incurred by

you or third parties arising from the use of these circuits, software, or information.

2. Renesas Electronics hereby expressly disclaims any warranties against and liability for infringement or any other disputes involving patents, copyrights, or other intellectual property rights of third parties, by or

arising from the use of Renesas Electronics products or technical information described in this document, including but not limited to, the product data, drawing, chart, program, algorithm, application

examples.

3. No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas Electronics or others.

4. You shall not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part. Renesas Electronics disclaims any and all liability for any losses or damages

incurred by you or third parties arising from such alteration, modification, copy or otherwise misappropriation of Renesas Electronics products.

5. Renesas Electronics products are classified according to the following two quality grades: "Standard" and "High Quality". The intended applications for each Renesas Electronics product depends on the

product’s quality grade, as indicated below.

"Standard": Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment; home electronic appliances; machine tools; personal electronic

equipment; and industrial robots etc.

"High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control (traffic lights); large-scale communication equipment; key financial terminal systems; safety control equipment; etc.

Renesas Electronics products are neither intended nor authorized for use in products or systems that may pose a direct threat to human life or bodily injury (artificial life support devices or systems, surgical

implantations etc.), or may cause serious property damages (space and undersea repeaters; nuclear power control systems; aircraft control systems; key plant systems; military equipment; etc.). Renesas

Electronics disclaims any and all liability for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for which the product is not intended by Renesas

Electronics.

6. When using the Renesas Electronics products, refer to the latest product information (data sheets, user’s manuals, application notes, "General Notes for Handling and Using Semiconductor Devices" in the

reliability handbook, etc.), and ensure that usage conditions are within the ranges specified by Renesas Electronics with respect to maximum ratings, operating power supply voltage range, heat radiation

characteristics, installation, etc. Renesas Electronics disclaims any and all liability for any malfunctions or failure or accident arising out of the use of Renesas Electronics products beyond such specified

ranges.

7. Although Renesas Electronics endeavors to improve the quality and reliability of Renesas Electronics products, semiconductor products have specific characteristics such as the occurrence of failure at a

certain rate and malfunctions under certain use conditions. Further, Renesas Electronics products are not subject to radiation resistance design. Please ensure to implement safety measures to guard them

against the possibility of bodily injury, injury or damage caused by fire, and social damage in the event of failure or malfunction of Renesas Electronics products, such as safety design for hardware and

software including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures by your own responsibility as warranty

for your products/system. Because the evaluation of microcomputer software alone is very difficult and not practical, please evaluate the safety of the final products or systems manufactured by you.

8. Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product. Please investigate applicable laws and

regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive carefully and sufficiently and use Renesas Electronics products in compliance with all

these applicable laws and regulations. Renesas Electronics disclaims any and all liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations.

9. Renesas Electronics products and technologies shall not be used for or incorporated into any products or systems whose manufacture, use, or sale is prohibited under any applicable domestic or foreign laws

or regulations. You shall not use Renesas Electronics products or technologies for (1) any purpose relating to the development, design, manufacture, use, stockpiling, etc., of weapons of mass destruction,

such as nuclear weapons, chemical weapons, or biological weapons, or missiles (including unmanned aerial vehicles (UAVs)) for delivering such weapons, (2) any purpose relating to the development,

design, manufacture, or use of conventional weapons, or (3) any other purpose of disturbing international peace and security, and you shall not sell, export, lease, transfer, or release Renesas Electronics

products or technologies to any third party whether directly or indirectly with knowledge or reason to know that the third party or any other party will engage in the activities described above. When exporting,

selling, transferring, etc., Renesas Electronics products or technologies, you shall comply with any applicable export control laws and regulations promulgated and administered by the governments of the

countries asserting jurisdiction over the parties or transactions.

10. Please acknowledge and agree that you shall bear all the losses and damages which are incurred from the misuse or violation of the terms and conditions described in this document, including this notice,

and hold Renesas Electronics harmless, if such misuse or violation results from your resale or making Renesas Electronics products available any third party.

11. This document shall not be reprinted, reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas Electronics.

12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products.

(Note 1) "Renesas Electronics" as used in this document means Renesas Electronics Corporation and also includes its majority-owned subsidiaries.

(Note 2) "Renesas Electronics product(s)" means any product developed or manufactured by or for Renesas Electronics.

http://www.renesas.comRefer to "http://www.renesas.com/" for the latest and detailed information.

Renesas Electronics America Inc.2801 Scott Boulevard Santa Clara, CA 95050-2549, U.S.A.Tel: +1-408-588-6000, Fax: +1-408-588-6130Renesas Electronics Canada Limited9251 Yonge Street, Suite 8309 Richmond Hill, Ontario Canada L4C 9T3Tel: +1-905-237-2004Renesas Electronics Europe LimitedDukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.KTel: +44-1628-585-100, Fax: +44-1628-585-900Renesas Electronics Europe GmbHArcadiastrasse 10, 40472 Düsseldorf, GermanyTel: +49-211-6503-0, Fax: +49-211-6503-1327Renesas Electronics (China) Co., Ltd.Room 1709, Quantum Plaza, No.27 ZhiChunLu Haidian District, Beijing 100191, P.R.ChinaTel: +86-10-8235-1155, Fax: +86-10-8235-7679Renesas Electronics (Shanghai) Co., Ltd.Unit 301, Tower A, Central Towers, 555 Langao Road, Putuo District, Shanghai, P. R. China 200333Tel: +86-21-2226-0888, Fax: +86-21-2226-0999Renesas Electronics Hong Kong LimitedUnit 1601-1611, 16/F., Tower 2, Grand Century Place, 193 Prince Edward Road West, Mongkok, Kowloon, Hong KongTel: +852-2265-6688, Fax: +852 2886-9022Renesas Electronics Taiwan Co., Ltd.13F, No. 363, Fu Shing North Road, Taipei 10543, TaiwanTel: +886-2-8175-9600, Fax: +886 2-8175-9670Renesas Electronics Singapore Pte. Ltd.80 Bendemeer Road, Unit #06-02 Hyflux Innovation Centre, Singapore 339949Tel: +65-6213-0200, Fax: +65-6213-0300Renesas Electronics Malaysia Sdn.Bhd.Unit 1207, Block B, Menara Amcorp, Amcorp Trade Centre, No. 18, Jln Persiaran Barat, 46050 Petaling Jaya, Selangor Darul Ehsan, MalaysiaTel: +60-3-7955-9390, Fax: +60-3-7955-9510Renesas Electronics India Pvt. Ltd.No.777C, 100 Feet Road, HAL II Stage, Indiranagar, Bangalore, IndiaTel: +91-80-67208700, Fax: +91-80-67208777Renesas Electronics Korea Co., Ltd.12F., 234 Teheran-ro, Gangnam-Gu, Seoul, 135-080, KoreaTel: +82-2-558-3737, Fax: +82-2-558-5141

SALES OFFICES

© 2017 Renesas Electronics Corporation. All rights reserved.Colophon 6.0

(Rev.3.0-1 November 2016)