Close

The POC (Part 3 – The WiFi)

It started as an external module connected via serial to the Mega, to connect the NodeMcu to the Mega you need to flash it with the appropriate rom to get it to work with the IDE (I did it with NodeMcu PyFlasher) , then you have to do the following:

  • Include the code on the Mega to open the serial port via software to send the data (json) to the NodeMcu
  • Include the code on the NodeMcu to receive the data from the serial port, post it to the server, receive the response from the server and send the response via serial to the Mega.
  • Include the code on the Mega to process the response from the NodeMcu
  • Connect the NodeMcu to the Mega via serial, to do this you just pick to pins that allow coms between the two boards
  • Power the NodeMcu by connecting the 3v pin of the NodeMcu to the 3V pin of the Mega

The issues arise when receiving the response from the NodeMcu because the serial message was including some unknown characters so the definitive process went from sending the data from the Mega to the NodeMcu, posting it to the server and letting the Mega without the confirmation until further investigation of the process of sending back the info via serial.

0 0 vote
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
© 2021 Weather IOT Project | WordPress Theme: Annina Free by CrestaProject.
0
Would love your thoughts, please comment.x
()
x