LEVEL 1: BEGINNER |
This guide will show you how to get started with the Synergy SK-S7G2 Starter Kit. You will learn how to easily toggle a LED light on the board in two different ways: either by pressing a button on the board or by toggling a button in the Renesas IoT Sandbox.
HERE’S WHAT YOU NEED TO GET STARTED:
- Renesas Synergy SK-S7G2 Starter Kit
- Micro USB cable to power up the board
- One of the following two:
- Renesas WiFi adaptor for GT202
- Ethernet connection
- WiFi Internet access (2.4GHz only) (if using WiFi adapter)
- SK_S7_LED_Toggle.srec file – download (Last Updated 3/23/2017)
STEP 1: PROGRAM THE SK-S7 BOARD WITH THE LED TOGGLE IMAGE
Program the SK_S7_LED_Toggle image to the SK-S7 board following the instructions in the “How to flash the SK-S7 board” tutorial. Be sure to download the latest release .srec file that is specific to this kit. This can be found under the HERE’S WHAT YOU NEED TO GET STARTED section.
STEP 2: ACTIVATE KIT IN RENESAS IOT SANDBOX
Click here to activate the kit and complete the registration process to create a Renesas IoT Sandbox account preloaded with the LED Toggle IoT workflows. Once activation is completed, you will receive an email with your account credentials needed to provision the kit and access the cloud portal.
This email will include your:
- Renesas IoT Sandbox web login
- API Key
- Device username and password
STEP 3: CONNECT THE SK-S7 KIT TO THE CLOUD
Note: The SK-S7 kit WiFi adapter only works with 2.4GHz WiFi.
The board can be connected to the internet via Ethernet (requires Ethernet cable) or WiFi (requires WiFi adaptor). The following picture shows WiFi adaptor, Ethernet connector, and micro USB cable connections into the board. The micro USB cable is necessary to power up the board.
To read a quick summary on how the board connects to a network, go to Appendix A.
NOTE: Ensure your PMODs are powered by 3.3V. To do so, connect pins 0 and 1 of jumper J13; similarly, connect pins 0 and 1 of jumper J15 to select 3.3V option.
The following pictures (Figure 1, 2, and 3 respectively) depict three different ways (Ethernet, WiFi, and Access Point) your board display may look like upon powering the SK-S7 board. This also determines what provisioning you are required to do.
Note: Ethernet connection takes precedence over WiFi connection.
Option 1: Provision the Board for Ethernet access:
- Connect the Ethernet cable at J11 Ethernet port.
- Power up the board by connecting the micro USB cable into J19 (DEBUG_USB) on the board. Once Ethernet is detected, the board will boot up in provisioning mode.
- When you see the screen as shown in Figure 1, connect to the IP address printed on the screen using the browser on your computer. Make sure your computer is on the same network as the board. This will connect you to the provisioning page of the board to set up the IoT Sandbox credentials. Note: Keep a copy of your activation email readily available.
Option 2: Provision the Board for WiFi:
- Connect the Renesas WiFi Adaptor for GT202 to J12 (PMODA) on the board and disconnect the Ethernet cable.
- Power up the board by connecting the micro USB cable into J19 (DEBUG_USB) on the board. Once the WiFi Adaptor is detected, the board will boot up in provisioning mode and become a WiFi Access Point.
- If this is your first time provisioning the board with a WiFi adapter, you will see the picture as shown in Figure 3. Connect your computer to the board’s WiFi access point using the WiFi on your computer. The SSID and password is printed on the SKS7 display. This is a Wifi Access Point served by the board and is a unique SSID. Note: Keep a copy of your activation email readily available. Once connected to the board’s Wifi Access Point, you will not have internet access on your computer.
Once the provisioning page is loaded, you will see a form similar to the image below. Enter your credentials provided in your activation email.
Note: If you accessed this page before, Renesas Kit Configuration will remember your previously entered login credentials, such as Project MQTT ID, User MQTT ID, API Key, and API User Password.
After clicking ‘Connect’, you will get a message: Provisioning complete. Please reset board to continue.
Reset your board by re-inserting the micro USB cable. Now you are ready to login to Renesas IoT Sandbox and visualize data on dashboard.
STEP 4: VISUALIZE DATA ON DASHBOARD
Login to Renesas IoT Sandbox with your web credentials. Note: If you have more than one Renesas IoT Sandbox project, make sure you select this project in the top right drop down. After selecting your project, refresh your browser. If you forgot the name of your project, it can be found in the activation email.
Select Dashboard from the left navigation sidebar. On the main view, you will see the Dashboard with multiple widgets (at the bottom).
This project’s dashboard comes with preloaded widgets – Real Time Events Stream, Real Time Gauge and Boolean Input.
Now, let’s test out the kit. Press the button (button 55) on the board — you should see two things happen:
- Visually, you see a LED1 light up on the board.
- In the Real Time Events Log, you get to see messages received and displayed from the board as they come in. You can use this as an indicator that the board is successfully connected to the Renesas IoT Sandbox. Note: the messages are received in JSON format.
The following is a Real Time Event log file. As you can see, the button was pressed twice represented by two event logs; the 1st event reports LED turning off, the 2nd event reports LED turning on.
Finally, you can also toggle the LED light by pressing the “Send Event” button on the Boolean Input widget. Once you click this button, the LED light on board should toggle, as well as, the events appear in the log file.
Same type of events log file occurs:
The board display shows some connectivity information such as mode (Ethernet or WiFi), IP address, and Last Connect (date and time) of last successful connection to your board.
Congratulations! You just learned how to easily toggle an LED light on the board by using two different methods – pressing a physical button on the board or toggling it through the cloud.
You’re now familiar with SK-S7G2 Starter Kit, Renesas IoT Sandbox platform, and just tapped into the possibility of exciting new projects.
The rest is up to your imagination!
Try another SK-S7G2 Starter Kit quick start guide:
- Heartbeat Kit (Level 1: Beginner)
- Connected Weather (Level 2: Intermediate)
- Ultrasonic Presence Sensor Kit (Level 2: Intermediate)
- Connected Weather with AMS Sensor (Level 3: Advanced)
Or build your own solution based on the LED Toggle kit demo (see APPENDIX).
1. Expand the LED Toggle Kit demo
Login to your Synergy account and download the source code here to modify this demo and build your own customized solution.
2. Summary of how the board connects to the network
In SK-S7 Starter Kits, the network connection is “auto-detected”:
- First, a wired ethernet connection is attempted. If the wired connection link is up within 5 seconds, then DHCP resolution is attempted. If an IP address is resolved within 10 seconds, the wired connection is used and mode shows “Ethernet”.
- Otherwise, a WiFi connection is attempted and mode shows “WiFi”. If the WiFi credentials have been provisioned and the board is able to associate with the AP within 10 seconds, the WiFi connection is used.
- Otherwise, the board enters Access Point mode and mode shows “AP”.
A network connection must be found before the kit will run.
Regardless of the network connection, the provisioning server is always running. You can access the provisioning page by navigating to the board’s IP in the browser.