Hi. I am controlling an ESP8266 + NodeMCU v2 WiFi module (communication via UART) from an XMEGA processor. I send commands in LUA language to the module in this way. An example can be seen below:
.
When I connect, I want to send the value of a software variable indicating the currently measured voltage on one of the processor peripherals (let's call it working name bat_lvl). The problem is that I don't know how to "extract" and send such a variable. So far, all I send is "static" text:
.
.
Trying to send the value of the variable doesn't work (I can't see anything reaching the terminal I'm tapping on):
.
Does anyone perhaps know the solution to my problem? I have looked on the internet for a solution but cannot find any example that answers my question.
Code: C / C++
When I connect, I want to send the value of a software variable indicating the currently measured voltage on one of the processor peripherals (let's call it working name bat_lvl). The problem is that I don't know how to "extract" and send such a variable. So far, all I send is "static" text:
Code: C / C++

Trying to send the value of the variable doesn't work (I can't see anything reaching the terminal I'm tapping on):
Code: C / C++
Does anyone perhaps know the solution to my problem? I have looked on the internet for a solution but cannot find any example that answers my question.