problem with "Nodemcu" Esp8266 component macro {solved}

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
User avatar
Emadex3
Posts: 9
Joined: Sat Apr 28, 2018 7:43 pm
Location: Home
Has thanked: 5 times
Contact:

problem with "Nodemcu" Esp8266 component macro {solved}

Post by Emadex3 »

First of all, am sorry for this amateur question however I can't seem to use Esp8266 because I can't tell how exactly FlowCode communicate with the ship,

I know it's physically connected through rx,tx pins of both micro-controller and Esp (Using NodeMcu1 model BTW), however, the component macro just won't work for me, for example if I want my Esp to connect to an existing WiFi I would use "Connect to SSID" with correct paramaters, however, since the Esp isn't my target ship (Arduino Mega 2560 r3 is) , how will it respond to the macro.

I tried all macros and none are working with driving the Esp.

my connections are fairly simple,
Arduino to NodeMcu
rx to tx
tx to rx
GND to GND
+5v to vin)

the confusing part is that sometimes the NodeMcu1 respond to macros .

please enlighten me on how to use Esp8266 WiFi component, No the wiki pages doesn't help :roll:
Last edited by Emadex3 on Fri Jul 09, 2021 2:53 pm, edited 2 times in total.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Super cofused about Esp8266 component macro

Post by Benj »

Hello,

Please can you post a simple program and we will have a look for you and suggest if you're doing anything wrong.

User avatar
Emadex3
Posts: 9
Joined: Sat Apr 28, 2018 7:43 pm
Location: Home
Has thanked: 5 times
Contact:

Re: Super cofused about Esp8266 component macro

Post by Emadex3 »

My bad, here you go :D

my Nodemcu board has a "9600 bps Baud rate" printed on it"
Attachments
esp8266.fcfx
(11.15 KiB) Downloaded 114 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Super cofused about Esp8266 component macro

Post by Benj »

Hello,

Thanks for posting your program, it looks fine to me.

I wonder if the NodeMcu1 is the problem, it's designed to be a stand alone board rather then a simple WIFI module. One thing you could try is a baud of 115200 and see if that helps.

I have only ever used the component with ESP01 ESP8266 devices and I wonder if the NodeMCU board comes with different firmware loaded onto it? If it does then it should be possible to get the ESP01 firmware and flash it onto the NodeMcu1 device. After all it's all the same chip under the hood.

User avatar
Emadex3
Posts: 9
Joined: Sat Apr 28, 2018 7:43 pm
Location: Home
Has thanked: 5 times
Contact:

Re: Super cofused about Esp8266 component macro

Post by Emadex3 »

been at it for hours and it finally works. thanks

I flashed "ESP8266_NonOS_AT_Bin_V1.7.4" into the nodemcu and it works just fine now with flowcode. :D :D


- now I want to transfer variable values from arduino to esp8266 and make them available for "wincc" program "through MODBUS TCP/IP" protocol.
is that altogether possible with flowcode 8 ? or even v9

should I open a new thread for that ? sorry for inconvenience :oops:

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Super cofused about Esp8266 component macro {solved}

Post by Benj »

Hello,

V9 can certainly do it, I think v8 should be able to as well. I recently fixed some bugs but I'm pretty sure I rolled the fixes back to v8 if you do the component updates.

Here's a video I made using a ESP32, simply replace the ESP32 TCP component with the ESP8266 component and it all should work.

Part1
https://www.youtube.com/watch?v=OKUJiCT5G8s

Part2
https://www.youtube.com/watch?v=ZVg91kJOXdY

Let us know how you get on.

User avatar
Emadex3
Posts: 9
Joined: Sat Apr 28, 2018 7:43 pm
Location: Home
Has thanked: 5 times
Contact:

Re: Super cofused about Esp8266 component macro {solved}

Post by Emadex3 »

I've watched your videos previously, they do help but not with how I want to do it.
what I want to do is :

get sensor data ---> save sensors data in multiple variables in Arduino mega ---> send all sensors data from arduino to esp2866 ----> send said data from esp to modbus Master (wincc program in my case)

all the while I have the ability to send data in reverse , say from "wincc" program to esp to arduino

I've got the sensors to arduino figured out + the esp to wincc part however, the arduino to esp is not working for me (frankly I am beginning to think my analogy is impossible altogether)

I'm working on a similar approach in case the previous one doesn't work (this approach isn't working either :cry: ) :
Sensors --> arduino 1 programmed with flowcode ---> arduino 2 programmed with Arduino IDE ---> Wincc with OPC protocol

the reason why arduino 2 is programmed with arduino IDE is because I couldn't integrate Arduino OPC library (st4makers) in flowcode

I opened a new thread in "general programming" as this thread seems dead to me

Post Reply