Chat here is you are connecting ESP-xx type modules to existing AVR based Arduino

Moderator: igrr

User avatar
By Craig54321
#74215 Martin, Thanks for the MyAPClient an Server. I got them to work and am now trying to learn from them. My aim is to get to the TCP communication. I'm trying to read an accelerometer in a high vibration environment (a tennis racket) transmit this data from the on-racket ESP8266-client to a ESP8266-server that sits on a bench and collects the data on a SD card. But for the moment, learning... your many posts and the Kolban book have been great help.

Is the statement "server.handleClient();" in the MyAPServer loop persistently called? It appears so. That would mean it is checked 125 or 500 times each blink. If so, that would look like a persistent connection I was looking for. Further, that would lead me to think that I could leave the client connection on full time during a data collection session. Would that be okay?
User avatar
By Craig54321
#74268 Maybe this is of use to others. Since I spent more time than I care to admit on this I thought I'd share
it for others to use or for more knowlegeble people to correct. In looking through the wealth of Arduino
example code and Martin's code (both true gifts) I couldn't find documentation on the programming
details. So I put my head down to DIY.

The details are in the attachment because I was loosing control of my tab's in this UI.

Hope it helps and please comment if I've got it wrong.
You do not have the required permissions to view the files attached to this post.
User avatar
By mugangamic
#77055 I believe this is very similar what i have faced.
Simple question that i need to understand better:
02 nodemcu + LDR + RELAY (without using mqtt).
Can i have 01 nodemcu (with LDR) working as a server and once ldr reach a certain value it send a command to trigger the client (nodemcu with relay)?
I have seen 01 nodemcu (with LDR) working as a client (get request) and nodemcu with relay as server. But as i did mentioned before i would like to have LDR connected to server and the server send commnd to trigger the client (nodemcu with relay).

Any suggestion regarding use a specific protocol or whatever subject i should have a look it would be very welcome.

Many thanks