3 years, 1 month ago.

How do I send sensor data through my X_NUCLEO_IDW01M1v2 to an HTML Form

How do I send sensor data through my X_NUCLEO_IDW01M1v2 to an HTML Form.

I'm trying to send data to a PHP website. I have that has a basic HTML post form. After the IDWO1M1v2 sends the data the website will take the data and insert it into a database. I've trimmed the form to listen for only one field and I was going to hard code the nucleo to send a static value once on connection.

I can't figure out where to start. It seems as though you'd want to use the httpClient library in conjunction with the IDW01m1v2 library.

Any thoughts would be greatly appreciated.

1 Answer

3 years, 1 month ago.

It depends on what version of mbed OS you want to use. If mbed OS2, then you can use https://os.mbed.com/teams/ST/code/X_NUCLEO_IDW01M1v2/, this library allows you to setup Wi-Fi connection and then pass data to your PHP server using socket_ functions provided by this library (look API reference and examples). If mbed OS5, import this to your project https://github.com/ARMmbed/wifi-x-nucleo-idw01m1, setup Wi-Fi connection, and then use TCPSocket to send your data, using SpwfSAInterface object as NetworkInterface instance.