ESP32

Any bugs you encounter with Flowcode should be discussed here.
Alan_37
Posts: 125
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 7:23 pm
Has thanked: 37 times
Been thanked: 17 times

ESP32

Post by Alan_37 »

Hi, I have been playing with Esp32, and if I am not doing something wrong the following are bugs.

1, The quad encoder Post Scaler 1:4 does not work it always returns 4 steps at a time.

2, If putting an OR statement in a loop will not compile to hex.

3, for some strange reason sometimes ( not always) when using local variables, will cause failure to compile ( then use global and compile ok)

4, MQTT read timeout does not work Setting it 50ms it stops there until a message is received after 1
a minute or so if no message is received will exit and will not work again.

LeighM
Valued Contributor
Posts: 398
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 70 times
Been thanked: 212 times

Re: ESP32

Post by LeighM »

Hi,
Thanks for the post.
Would it be possible for you to give us some examples?
These look like very specific scenarios that we might not have enough information to replicate.
For example, OR is a bitwise OR, so might not be suitable for your situation.
Thanks

Alan_37
Posts: 125
Joined: Thu Dec 03, 2020 7:23 pm
Has thanked: 37 times
Been thanked: 17 times

Re: ESP32

Post by Alan_37 »

HI ,

So the loop bug example -> Loop until: var1 = 100 OR var2 = 200 .

As for the MQTT read timeout, this is very important cos it stops all the code from executing
I was able to work around the problem of it stop receiving by doing a disconnect and connecting again
every time I run the Read.

but it still hangs there waiting.
Attachments
Flowcode1.fcfx
(24.85 KiB) Downloaded 112 times

LeighM
Valued Contributor
Posts: 398
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 70 times
Been thanked: 212 times

Re: ESP32

Post by LeighM »

Hi,
Try this instead

Code: Select all

(var1 = 100) || (var2 = 200)
I'll have a chat with Ben re the IOT bug on Monday, it's his wrap on my MQTT Client.

Alan_37
Posts: 125
Joined: Thu Dec 03, 2020 7:23 pm
Has thanked: 37 times
Been thanked: 17 times

Re: ESP32

Post by Alan_37 »

Thanks, looking forward for the fix .

BenR
Matrix Staff
Posts: 1734
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 439 times
Been thanked: 603 times

Re: ESP32

Post by BenR »

Hello,

Does this work any better for you?
IoTMadeEasy.fcfx
(25.17 KiB) Downloaded 112 times

Alan_37
Posts: 125
Joined: Thu Dec 03, 2020 7:23 pm
Has thanked: 37 times
Been thanked: 17 times

Re: ESP32

Post by Alan_37 »

Hi Ben, Thanks for your reply

No, it does not work, the led does not blink because the read timeout is not working
and the esp is stuck waiting for the MQTT message.

After some time led starts to blink but then it does not receive MQTT messages anymore
then it connects again and stops there waiting again.

I can still ping the esp and my MQTT server is also pingable.

Alan_37
Posts: 125
Joined: Thu Dec 03, 2020 7:23 pm
Has thanked: 37 times
Been thanked: 17 times

Re: ESP32

Post by Alan_37 »

I have a question,

Does the free ESP32 chip pack have limited support or offered as is ?

LeighM
Valued Contributor
Posts: 398
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 70 times
Been thanked: 212 times

Re: ESP32

Post by LeighM »

Hi,
Could you please try the attached updated file, to go into C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP
Thanks
Attachments
ESP_CAL_WIFI.c
(11.48 KiB) Downloaded 101 times

Alan_37
Posts: 125
Joined: Thu Dec 03, 2020 7:23 pm
Has thanked: 37 times
Been thanked: 17 times

Re: ESP32

Post by Alan_37 »

Hi LeighM, Thanks for your reply

I have replaced the file now the read timeout seems to be working but
now the ESP is not able to receive or send any messages from/to the MQTT server .

Post Reply