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
ESP32 Timer compiler error
-
- Posts: 3
- http://meble-kuchenne.info.pl
- Joined: Tue Nov 02, 2021 5:18 pm
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: ESP32 Timer compiler error
Hello,
Please can you post your project and I'll have a look for you
Please can you post your project and I'll have a look for you
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 3
- Joined: Tue Nov 02, 2021 5:18 pm
Re: ESP32 Timer compiler error
]Simple timer with out load to main. Only donwload to components. and don't compile
- Attachments
-
- FlowcodeTimerNoCompile.fcfx
- (7.47 KiB) Downloaded 246 times
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: ESP32 Timer compiler error
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 54
- Joined: Wed Sep 08, 2021 10:36 pm
- Has thanked: 26 times
- Been thanked: 11 times
Re: ESP32 Timer compiler error
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
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
-
- Posts: 3
- Joined: Tue Nov 02, 2021 5:18 pm
Re: ESP32 Timer compiler error
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