Hi, I am trying to use an IMP to read temperature data from a microcontroller using the SPI bus. I am completely new to the imp world. Does anyone have any idea of how to achieve this. Also is there is any up to date tutorials on how to send that data to a website/mobile phone APP. If i could just get a general overview of this proceedure that would be much appreciated.
I presume it will be something like this-
set up variables
imp CS low
imp SPI read data
imp CS high
SPI data send to agent
agent send to url https\\…
then this updates a html page. How to do this…
Thanks in advance
If you’re new to imp, I suggest you take a look at some of the Developer Guides available in the Dev Center. In particular, you should look at ‘SPI Explained’, which will tell you a lot about the bus and how you use SPI-connected peripherals in an imp-enabled device.
As for posting data to a mobile app, what you’ll actually need to do is have the app request data from the agent. This is because mobile devices don’t usually operate as servers, whereas that’s exactly what an agent is.
You can also have the agent post to code running on a server of your own, or host its own interactive site. This article has some guidance on that.
To elaborate some more … on your website, you can use a PHP script that the agent “posts” to. The PHP script can log values into a MySQLi database. Once there, any other PHP script can read them and make charts, graphs, etc. You’ll want to use JSON as the format of data being sent/received. The tutorials describe that.