I am working on a prototype data logger using the FRDM-K64F that takes readings from local sensors and then posts these readings to an external web server (thingspeak.com) so that they can be stored and displayed over time. Currently I can collect the sensor readings and display them on a local webpage using the MQX webserver function but I am unable to get my board to talk to the external server.
Hello Richard Parker:
If I understand correctly you want to implement an HTTP client with the K64 using HTTP post request.
I don't know of any exact implementation like that to log data, but from a general perspective this is how you should do it:
- Use the DNS system from RTCS TCP/IP stack to get the IP address of the server.
- Implement the http client to use POST and GET requests. There is an application note about using an http client to send or receive data from a Twitter account. This appnote is very old but the theory should be valuable for your application:
And you can also download the software package as reference:
Regards!
Jorge Gonzalez
Thanks for pointing me in this direction. I will have a look at the application note.
Richard