Gadget Renesas

Linking Ideas and Electronics


GR special page

Cloud Accesses with Milkcocoa!


Milkcocoa is the cloud-based platform which enable us to exchange the data in real time, its service provided by Uhuru Technical Rockstars.
Let’s play with Milkcocoa, putting GR board and WiFi module of ESP8266 together.



Connect it with WA-MIKAN. For the purchase, please refer to here



Please get ready with ESP8266 module and connect TX, RX signals for serial communication. The example connected to GR-SAKURA as follows. Set IO15 pin at Low, EN pin at High, since ESP8266 is used with AT command mode.



Creating the application with Milkcocoa

Log in and create the application to use service of Milkcocoa. To know overview, it is OK to make it along tutorial

1. Login

Access to login Milkcocoa Please note that it is necessary to create an account to login.


2. Creating application

Push the button to create application with the suitable name. The below chart shows the application named "GR".


3. Copy of app_id

Application overview is displayed as follows when the created application is clicked. Cloud access will be gained based on the information of this screen. Don’t forget to copy "app_id" for later use.



Access to Milkcocoa

Making of the project

With the library to access Milkcocoa in the template on the Web compiler, let’s make a project.


Editing Sketch program

Open gr_sketch.cpp and edit four shown below. Then, let’s build and write cotton_sketch.bin at GR-COTTON. 
・ESP_Serial: : Serial communication number, please refer to a pin map. 
・WLAN_SSID: Access point  SSID
・WLAN_PASS: Password at the access point 
・MILKCOCOA_APP_ID: app_id for the application created with Milkcocoa 
・MILKCOCOA_DATASTORE: Suitable element name, temporarily MILK_COTTON here


Operation check

After writing sketch program, let’s check it with serial monitors such as Teraterm. GR-SAKURA and/or GR-CITRUS case,please note that sometime it may not start unless you press the enter key on keyboard after monitor start.
Please find the successful example of the access to Milkcocoa in the below chart, 「onpush」and/or「v:**」displayed in the end of display.
In this case, GR-board send out temperature data to Milkcocoa every seven seconds and then display them in the monitor when a notice comes from Milkcocoa. It means, if several GR boards connect to Milkcocoa, they can receive notices at the same time.


Let’s check datastore of Milkcocoa to see uploading {"v":**} every seven second as below.



Let’s try to operate GR board on Web browser

Please refer to an example operating GR board through Web browser GR-COTTON Special Page