I am new to MSP430 microcontroller, though I am coding MSP430 using Energia IDE which is similar to Arduino IDE.
My project is to build an "IoT Based Air Pollution Monitoring System"
I am taking input from the sensor (And I am done with the coding of this part it was simple) But now I have to put the data on Thingspeak server using ESP8266 and i dont have a clue how to do it.
I will be grateful if someone please provide me the code to connect ESP8266 to MSP430 and send data to Thingspeak! Please!!
Sensor is MQ135 which I have caliberated for CO2 reading. I have to connect ESP8266 to the MSP430 and send data to thingspeak!
PS: I tried going to 43oh forum (Energia Forum) but it is not allowing me to login for some reason the site is buggy!
For this to work, you would have to use the ESP8266 as a WIFI module, meaning you have to load it with an AT firmware. After that, you "talk" to it via a UART interface using "AT" commands. You can then instruct the ESP8266 to open/initiate TCP/UDP socket to a server somewhere in your local network or the Internet.
Did you choose the MSP430 because it is a ultra-low-power microcontroller?
If not I would recommend programming everything on a ESP32.
And ESP32 has a RTC onboard and can be put into a deep-sleep-mode in which the board just consumes something around 150 µA. Depending on the board-type this could be reduced down to 25 µA.
If you insist on keeping the MSP430,
I would not recommend using the AT-firmware. It will be much easier to write a program with the arduino-IDE that does the data-exchange with your MSP430 over a serial interface. On this path you can control every detail of the serial data-exchange and the behaving of the WiFi-part.
For the ESP32 standanlone-version
There are libraries for sending the data to ThingSpeak
best regards Stefan
For me we have to compulsorily use msp430
this is a solvable problem.
I guess your MSP430 can communicate over a standard serial UART-interface.
At a low baudrate this can be done in complete software without any special-purpose-hardware-UART-interface inside of the MSP430
Even if you would have to send 1 kB of sensordata very often even at a slow baudrate of 9600 baud this would be done within 1024 Byte * 11 Bit / 9600 baud = 1,2 seconds
instead of reading the BMP280-sensor you wold receive the sensor-data over the serial connection and the rest is done by the ESP8266
like desceribed in this tutorial
best regards Stefan
So how are your classmates handling this homework assignment?
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.