Current sensor is buy from taobao, not a model, for the digital output;
WIFI is ESP12s
Is now very pain and confusion of current sensor continuously through a serial port to send MCU current value, how to set the WIFI access to the single chip microcomputer, through single chip microcomputer analytical current value, via WIFI to mobile phone?
The second is that if the phone to MCU through WIFI, at the same time, current sensor are also send MCU current value, how to solve the problem of the conflict of both?
Ask you a great god give an idea, I'm going to collapse,,,,
CodePudding user response:
Open two serial port, serial port 1 used to read the current sensor current value, a serial port 2 is used to accept mobile phones to send commands and sends the current value toCodePudding user response:
A, now very pain and confusion is a steady stream of current sensor via a serial port to send MCU current value, how to set the WIFI access to the single chip microcomputer, through single chip microcomputer analytical current value, via WIFI to mobile phone?Online for a WIFI turn serial interface chip, you only need to write a serial port communication program, many simple! Don't need to write your own TCP communications program, if you write your own TCP procedures, complex! ,
Two, two is that if the phone to MCU through WIFI, at the same time, current sensor are also send MCU current value, how to solve the problem of the conflict of both?
Ha ha!
1, the current sensor are also send MCU current value, takes single-chip microcomputer serial port 1
2, mobile phone and WIFI (WIFI turn serial interface chip) communication, and takes single-chip microcomputer serial port 2
Not each other! Our equipment is so drop!
CodePudding user response:
Is ESP12s (ESP8266?) Itself is a powerful microcontroller module, sensors connected to the ESP12S, programming,Mobile phone server-side programming and ESP12S communication