Post on 13-Apr-2017
IoT Research Projectproject 2
Photon Redboard
P1 wifi module.
-cortex m3 processor
-broadcom wifi chip
Tinker app
multiple modes
LM35 Linear Temperature Sensor
Minimum 4V power Supply
-Returns voltage based on temperature (10mv/ºC)
-Analog Output
Maximum 3.3V Return voltage
-Handled by voltage divider.
Errors we needed to resolve (Voltage Reading)
The Cloud
Particle Cloud (formerly Spark)Rest API
Program interactionGET, PUT, POST
Security TSL
How it works
Hosts programs and data
Middleware
Protocols
End Data Application
Our End Data Application is a program that utilises the data received from the Particle cloud and organises it into useful information in a table format. We used curl, a terminal program, to get the data from the server and
make it available locally for our app to use it.
Communicating to the Particle Cloud
Curl is an open source command line tool and library for transferring data with URL syntax.Curl supports FTP, FTPS, HTTP, HTTPS,
IMAP, etc. protocols. First time connection gives us the access tokenThe access token can be obtained from the Particle build
website or using curl too.This gives us full control over the sharing of information to
any third party clients.
Data Processing
Communicates asynchronously using completion blocks
The cloud outputs the data in an improper JavaScript Object Notation (JSON) format
An example of the data:event: Temperaturedata: {"data":"27C","ttl":"60","published_at":"2015-11-21T19:52:39.585Z","coreid":"380046000f47343337373737"}
Data Processing
Save the data to a text file (.txt)
We run a bash script that contains a python script and other commands
As the Python script is executed, it takes only the relevant data and output it it to a comma separated values file (.csv)
Temperature,Time Stamp27C,2015-11-21T19:52:33.584Z27C,2015-11-21T19:52:36.584Z27C,2015-11-21T19:52:39.585Z26C,2015-11-21T19:53:36.600Z28C,2015-11-21T19:53:39.601Z27C,2015-11-21T19:53:42.601Z99C,2015-11-21T19:53:42.601Z
Problems We Faced
Current going to the RedBoard was higher than expected
We implemented the JSON properly on a webpage, but it still did not appear on the page
The text format from when it got saved to the text file was the problem
We could not access the cloud until we carefully reread the document provided by Particle
FIN
From Team 5 to you, Happy Holidays!