Chat freely about anything...

User avatar
By gdsports
#73362
I want to build a device where a button is pressed on a small box and the press event is sent to a windows application on a nearby PC


An ESP8266 such as a NodeMCU board + button can send UDP or TCP to an application running on the PC. This assumes both the NodeMCU and PC are connected to the same network. There is no need for a serial port if your application can open TCP or UDP sockets.

can this board be used as a wireless serial port ?


Yes. If you have a legacy program running on the PC that only accepts input via serial port esp-link is a good solution. esp-link turns an NodeMCU (or any ESP8266) into a WiFi to serial bridge.
User avatar
By btidey
#73393 The lolin board is effectively a nodemcu clone. It has a physically wider format than the second generation NodeMCU making it more difficult to use with a breadboard.

To get more specific advice on sending to a PC App you need to say what you want to run there. Simple examples would be to send a MQTT message to the PC, or to send web based queries like REST.
User avatar
By Gadget999
#73461 thank you everyone for your replies

i am familiar with the arduino IDE so i plan to use that to program the device

i see the code for the esp link is here -- https://github.com/jeelabs/esp-link/tre ... r/esp-link

what do i need to program it to the board ? is this a version of firmware different to a sketch ?

i will research getting a udp and tcp message into my windows app :)