ESP32 Timer compiler error

For general Flowcode discussion that does not belong in the other sections.
Post Reply
josecastaneda
Posts: 3
http://meble-kuchenne.info.pl
Joined: Tue Nov 02, 2021 5:18 pm

ESP32 Timer compiler error

Post by josecastaneda »

Hello,
i want to use Timer and Timed Interval with ESP32 Wroom but flowcode V9 don't compile. Some body now my problem?
thanks in advance

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: ESP32 Timer compiler error

Post by BenR »

Hello,

Please can you post your project and I'll have a look for you

josecastaneda
Posts: 3
Joined: Tue Nov 02, 2021 5:18 pm

Re: ESP32 Timer compiler error

Post by josecastaneda »

]Simple timer with out load to main. Only donwload to components. and don't compile
Attachments
FlowcodeTimerNoCompile.fcfx
(7.47 KiB) Downloaded 45 times

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: ESP32 Timer compiler error

Post by BenR »

Thanks very much for the file, I'll see if we can add support for the ESP32 hardware.

For now the ESP32 timers are done in a very different way so it might proove tricky to make them do what we want here though I'll certainly have a go for you.

unity-control
Posts: 52
Joined: Wed Sep 08, 2021 10:36 pm
Has thanked: 26 times
Been thanked: 11 times

Re: ESP32 Timer compiler error

Post by unity-control »

I had the same issue when I started using ESP32.

However I've managed to adapt my program to use custom timers with some variables with minimal code. In other words, you can use a let's say 1ms Interrupt which is what I use at the moment. Inside the Interrupt routine, you just add something like this:

COUNT_TIMER_A_MS = COUNT_TIMER_A_MS + 1
COUNT_TIMER_B_MS = COUNT_TIMER_B_MS + 1
COUNT_TIMER_C_MS = COUNT_TIMER_C_MS + 1
COUNT_TIMER_D_MS = COUNT_TIMER_D_MS + 1

These are used throughout the program and you just count ms with them in your code for things to happen. You can reset them (set the variable to zero) and/or use other variables named for example COUNT_TIMER_A_MS_NOW to do simple maths and trigger events...

I think 1ms of resolution is quick enough for whatever task is needed...

Hope this helps!
R

josecastaneda
Posts: 3
Joined: Tue Nov 02, 2021 5:18 pm

Re: ESP32 Timer compiler error

Post by josecastaneda »

Many thanks , for now i forget flowcode v9 profesional. i use free software and this working very nice, BT, SPI(4 devices touch,SD,ILI9341 and max thermocouple). I don't know why when send image to GLCD this is like 10 Seconds Per Frame, instead of 60FPS

Post Reply