logo elektroda
logo elektroda
X
logo elektroda

How to send commands from Blynk to ESP8266?

def1000 894 8
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 19517070
    def1000
    Level 7  
    Hello.
    Please help me with my problem. I have written code in Arduino to measure the pH and temp of the pool. I added a control in Blynk to have a view in the mobile. Everything works as expected except for one thing. I calibrate the meter from the console and on the PC it works too, but I would like to be able to calibrate directly from the Blynk console and here is the problem. Because when I start the virtual port that shows the temperature and enter the AT command, nothing happens. So I cannot transfer commands from the Blynk to the ESP8266?
    Please help.
  • ADVERTISEMENT
  • #2 19517237
    khoam
    Level 42  
    Are you using just the ESP8266, or as an "add-on" to the Arduino Uno/Nano ?
  • #3 19517240
    def1000
    Level 7  
    only ESP8266 without UNO, therefore RX / TX pins free....
  • ADVERTISEMENT
  • #4 19517258
    khoam
    Level 42  
    def1000 wrote:
    So I can't send commands from Blynk to ESP8266?
    .
    So in general you can, but something on the ESP side should recognise these commands and take specific actions. For this you could use, for example, a Blynk component called Terminal (they don't have to be AT commands): Link .
    Example of use: Link .
  • #5 19517793
    def1000
    Level 7  
    that's not the point mate.... With the ESp on the Blynk the terminal shows the data, but with the Blynk terminal from a mobile phone when I type in AT commands it no longer does....
    And that's what I'm after. If anyone can help, please do. Best regards
  • ADVERTISEMENT
  • #6 19517906
    khoam
    Level 42  
    You do not understand how BLYNK_WRITE works on a virtual pin. Refer to the example I have already provided a link to.
    Quote:
    The BLYNK_WRITE function can pass a value (such as a number) sent from the application on your phone to your sketch as a parameter . You can get that value using the param variable . Once you have the value, you can convert it into an integer, and then store it in a local or global variable.
    .
  • ADVERTISEMENT
  • #7 19519221
    def1000
    Level 7  
    mate a terminal on a virtual PIN will work but one way and not send the other way. Maybe if you know and want to help then please provide an example sketch....
  • #8 19519246
    khoam
    Level 42  
    Example sketch (relevant excerpt):
    Code: C / C++
    Log in, to see the code
    After sending the command " Marco " from the terminal on the smartphone, ESP sends the command " Polo " to the smartphone terminal in response.

    How to send commands from Blynk to ESP8266? .
  • #9 19519472
    def1000
    Level 7  
    works... Great respect. I can see you are great and I hope you will be of service in the future too. You can email your business card to: lechkom(_at_)onet.pl -Thank you

Topic summary

The discussion revolves around sending commands from the Blynk app to an ESP8266 module for calibrating a pH and temperature meter. The user successfully measures and displays data on Blynk but struggles to send AT commands from the Blynk terminal on a mobile device to the ESP8266. Responses suggest using the Blynk component called Terminal to facilitate communication, emphasizing the need for proper handling of virtual pins and the BLYNK_WRITE function. An example sketch is provided to illustrate how to set up a virtual serial terminal, allowing for two-way communication between the Blynk app and the ESP8266.
Summary generated by the language model.
ADVERTISEMENT