AppsLab and OTN will jointly host IoT Workshop at Oracle OpenWorld and JavaOne conference in 2016. We look forward to seeing you at the Workshop.
Here is some details about the Workshop with step-by-step instructions. Our goal is that you will learn some basics and get a glimpse of Oracle IoT Cloud Service at the workshop, and you can continue playing it with IoT package after going home. So be sure to bring your computer so we can setup proper software for you.
Before we get into the step-by-step guide, here is the list of hardware parts we will use at the IoT Workshop.
1. Download and install software
We use the popular Arduino IDE to write code and upload to IoT device.You may download it from Arduino website even before coming to the workshop.
Just to make sure you get the proper platform for your computer, e.g. if you have a Windows machine, get the “Windows installer.”
The installation is straightforward, as it is very typical installation on your computer platform. If needed, here is instruction: https://www.arduino.cc/en/Guide/HomePage
2. Setup Arduino IDE to use NodeMCU board
We use a IoT device board called NodeMCU. Like Arduino Uno board, it has many pins to connect sensors and LED lights, but also has built-in WiFi chip which we can use to send input data into IoT Cloud.
You have installed Arduino IDE at step 1. Now open the Arduino IDE.
Go to File -> Preferences, and get to a page like this:
Add this “http://arduino.esp8266.com/stable/package_esp8266com_index.json” to the “Additional Boards Manager URLs” field, and then hit “OK” button.
Restart Arduino IDE, and go to “Tools” -> “Board” -> “Board Manager”, and select “esp8266 by ESP8266 Community”. Click it and install.
Restart Arduino IDE and go to “Tools” -> “Board”, and select “NodeMCU 1.0” board.
Also set up corresponding parameters on CPU Frequency, Flash Size, etc, according to above screenshot.
3. Quick Blink Test
To verify that we have set up the Arduino IDE for NodeMCU properly, we can connect the board to computer using a USB-microUSB cable.
Then go to “File” -> “New”, copy & paste this example code into coding window: https://github.com/raymondxie/iotws/blob/master/iotws_led.ino
Select the proper Port where board is connected via USB:
Click “Upload” icon on the top left of Arduino IDE, and observe that the sample code is loaded onto board. The on-board LED should blink once per second.
For some Macbook, if you don’t see proper port of “USBtoUART”, you need install a FTDI driver – you can download it from here.
For Windows machine, you will see certain “COM” ports. You need install this driver.
You can also play around and connect an external LED light to a pin similar to following wiring diagram, and modify the code to use that pin to blink the LED.
By now, you have completed the setup of Arduino development environment for NodeMCU – an IoT device, upload and execute code on the device.