Samsung ARTIK Cloud is an open data exchange platform for the Internet of Things, which allows us to collect, store, visualize and analyze data from any device.
This is a simple project that shows how to read temperature and humidity data from sensor, then send data to ARTIK cloud, by using PHPoC Blue. It's one more step to set up your own IoT system: monitoring temperature and humidity in your home via cloud server.
DemoWiring- Stack Grove expansion board to PHPoC Blue
- Connect Grove Temperature and Humidity sensor (HDC1000) via I2C connector.
First step is to create a new device type.
- Sign in to Developer Dashboard
- Select the tab Devices Types
- Click the "+ New Device Type"
- Set the device display name "HDC1000" and give it a unique name, for example, "com.phpoc.hdc1000"
- Click "Create Device Type" to create the device type
Create a new Manifest for the new device type
- Click "HDC1000" ==> "Set Up" ==> "Manifest" and then "New Manifest"
- Add two new data field, "temp" and "humid", with data type is Double, as below.
- Then "Next: Device Actions", and leave Actions as default
- Click "Activate Manifest" to finish creating new device type.
Go to MY ARTIK Cloud to create a new "HDC1000" device.
- Sign in to MY ARTIK Cloud
- Choose Devices ==> select the "HDC1000" device type to add a new "HDC1000" device.
- Click "Add device", then set the name for this device (e.g. Temp and Humid Sensor)
- Select the newly created device. In the pop-up, click "GENERATE DEVICE TOKEN…".
- After that, copy the Device ID and Device token. Set those values in your code (task0.php). Now the ARTIK setting up part is done.
$cur_device_id = "YOUR_DEVICE_ID";
$cur_device_token = "YOUR_DEVICE_TOKEN";
Sending data and monitoring on ARTIK CloudAfter the connection with ARTIK cloud has been set up, you can start sending data and visualize it on ARTIK.
- PHPoC will continuously read data from Temperature and Humidity Sensors, then it will send the message to ARTIK cloud using Web REST protocol.
- On MY ARTIK Cloud page, select Charts. From this window, you can monitor the visualized data.
Comments