CONNECT ESP8266 WIFI MODULE TO PC

For general Flowcode discussion that does not belong in the other sections.
CATSTAR
Posts: 18
http://meble-kuchenne.info.pl
Joined: Tue Dec 27, 2022 12:44 pm
Has thanked: 3 times
Been thanked: 1 time

CONNECT ESP8266 WIFI MODULE TO PC

Post by CATSTAR »

Hello to all!
is there a code example on how to connect an ESP8266 module to PC with wifi ? ..module is connected with a mcu , and I would like to send a temperature sensor data to PC in excel with data streamer in real time.

BenR
Matrix Staff
Posts: 1747
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 444 times
Been thanked: 604 times

Re: CONNECT ESP8266 WIFI MODULE TO PC

Post by BenR »

This topic may be useful for you.
viewtopic.php?f=9&t=161

CATSTAR
Posts: 18
Joined: Tue Dec 27, 2022 12:44 pm
Has thanked: 3 times
Been thanked: 1 time

Re: CONNECT ESP8266 WIFI MODULE TO PC

Post by CATSTAR »

Thanks Ben for help...above topic is for MODBUS-TCP...I 've made a project for that, but my question is for ESP8266 component and how to setup to connect that module to PC with WIFI...In a part of demo code, I was tried to setup ESP8266-12E as Access Point , but I don't see that in wifi network list in WLAN of my PC. It would be very useful to have an example about the correct sequence of component macros for ESP8266.
part of demo code....
WLAN_ESP8266:Initialise()
WLAN_ESP8266:CreateAccessPoint("Flowcode_ESP8266,"Flowcode6",5,2)

chipfryer27
Valued Contributor
Posts: 1163
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 287 times
Been thanked: 415 times

Re: CONNECT ESP8266 WIFI MODULE TO PC

Post by chipfryer27 »

Hi

If you go to the WiKi you will find many examples of using the ESP8266

https://www.flowcode.co.uk/wiki/index.p ... etworking)

Regards

CATSTAR
Posts: 18
Joined: Tue Dec 27, 2022 12:44 pm
Has thanked: 3 times
Been thanked: 1 time

Re: CONNECT ESP8266 WIFI MODULE TO PC

Post by CATSTAR »

ok...I made a wifi connection between ESP8266 and PC...now I would like to send data (strings) to PC ...ESP8266 is connected with a PIC ...
ESP8266 must be set as Access Point or Station, and how can I send data from PIC to PC using WLAN-ESP8266 component ? In WiKi
examples there is no something similar..If I was made a mistake about that, please let me know.

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: CONNECT ESP8266 WIFI MODULE TO PC

Post by p.erasmus »

Hi,

Here are some examples I received from Ben sometime ago the ESP_EasyPic6 example I started with as it connects the 8266 to a router and display the connection status on an LCD using a PIC16F1938 mcu hope this stuff help you

:D

ESP_EasyPic6.fcfx
(21.1 KiB) Downloaded 36 times
ESP8266_WifiScan.fcfx
(12.09 KiB) Downloaded 37 times
ESP8266_TCPServer.fcfx
(14.78 KiB) Downloaded 41 times
ESP8266_TCPClient.fcfx
(11.95 KiB) Downloaded 36 times
ESP8266_CreateAP.fcfx
(7.87 KiB) Downloaded 36 times
Regards Peter - QME Electronics

CATSTAR
Posts: 18
Joined: Tue Dec 27, 2022 12:44 pm
Has thanked: 3 times
Been thanked: 1 time

Re: CONNECT ESP8266 WIFI MODULE TO PC

Post by CATSTAR »

thanks p.erasmus for help...first example is to connect ESP8266 with router..more of that, I would like to send data ( from a sensor connected to PIC ) to PC , specifically to Excel using Data Streamer input feature , if it possible in real time..my goal is to get data samples of some sensors and display that on PC. I prefer MS Excel , for further processing of data.

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: CONNECT ESP8266 WIFI MODULE TO PC

Post by p.erasmus »

Hi,

The TCP server and client examples should show you how to write and read data from the Wifi then it depends on what software you are using on the PC side to process this reeived data,I am not the right person to give advise on that however Ben and the other guys might have some good ideas for you
Regards Peter - QME Electronics

chipfryer27
Valued Contributor
Posts: 1163
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 287 times
Been thanked: 415 times

Re: CONNECT ESP8266 WIFI MODULE TO PC

Post by chipfryer27 »

Hi

Whilst I like the idea of Excel Data Streamer I don't like the idea of forking out for 365 when an earlier version of Office works fine for me, to say nothing of Open Office etc.

Data Streamer documents compatibility with Arduino and other devices by communicating over a USB port, which can be selected in Advanced Settings. It certainly seems to favour microcontrollers that are USB equipped such as the Arduino family, giving examples of such. I'm certainly far from being an expert on the subject but from what I've read it seems that it is just a simple serial connection so you could connect any device using UART/RS232 and a Serial-USB converter. The data format appears to be CSV.

https://learn.microsoft.com/en-us/micro ... al-devices

However you are looking to use "WiFi" as your connection and this may be a challenge. The Data Streamer will attempt to capture all data appearing at a designated port, but your "WiFi" connection from PC to Router, even if by USB is not a simple dedicated serial connection. How would you separate your data from all other traffic?

If you need to use RF as a communications medium, perhaps due to inability of a direct cable connection or the like, it may be easier to implement over a dedicated RF serial link.

Again, I'm no expert in the matter and perhaps someone with greater knowledge may advise better.

Regards

CATSTAR
Posts: 18
Joined: Tue Dec 27, 2022 12:44 pm
Has thanked: 3 times
Been thanked: 1 time

Re: CONNECT ESP8266 WIFI MODULE TO PC

Post by CATSTAR »

thanks chipfryer27 for your help...Because the set PIC and ESP8266 must be mobile in a small PCB, I'll use WIFI to send data ..simply I would like to know how to use WLAN_ESP8266 and DSP components (CSV macros) to send data to PC writing in a buffer and then converting in .CSV fprmat..to display that, MS Excel is an option as there is no need to use 365, but some of earlier version of MS Office, adding on Data Streamer feature, but not the only one...PC will use only for that purpose to collect and display data..

Post Reply