App Developer Comport How to use interrupt

Discuss PC Developer and Web Developer projects and features here.
Post Reply
stefan.erni
Valued Contributor
Posts: 738
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 170 times

App Developer Comport How to use interrupt

Post by stefan.erni »

Hi Ben

Working with an interrupt on comport in the App Developer would be practical.
is there a possibility?

regards
Stefan
interrupt_2022-03-30_10-18-28.jpg
interrupt_2022-03-30_10-18-28.jpg (32.77 KiB) Viewed 1705 times

medelec35
Matrix Staff
Posts: 1432
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 506 times
Been thanked: 469 times

Re: App Developer Comport How to use interrupt

Post by medelec35 »

Hi Stefan.
Windows should not require an interrupt for the Comport as the data should be within the window's buffer.
If you look at how I did use the comport for the RTC
That works well with the circular buffer at 115200, with no data lost.

App Developer already has an interrupt of sorts, the Timed Event Trigger.
It works very well as an interrupt.
It will allow seconds, minutes or hours to be set.
I guess you could place the comport within the interrupt set for 1 second, but should not be required.
If the Timed Event Trigger component was to be modified at all then due to windows restrictions it could never be any less than 50ms.
Martin

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

Re: App Developer Comport How to use interrupt

Post by BenR »

Hello,

We don't currently have the ability to allow for this. As Martin says the best bet would be to use a timer and on the timer interrupt check for data, if there is data then pull in as much as possible into a local buffer you can process as and when as part of your main loop.

stefan.erni
Valued Contributor
Posts: 738
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 170 times

Re: App Developer Comport How to use interrupt

Post by stefan.erni »

Hi Martin, Hi Ben

No interrupt on the App Developer. OK.
So I made a pooling from the App Developer to the ESP32 by Bluetooth. I send 2 char "mp" from the App Developer.
Then the ESP32 is sending immediately from the Bluetooth interrupt a string with 36 char back.
It's working fast.( I set the baudrate from the comport to 2'000'000)

Later I try to do the same way a pooling with a SendINTArray from the ESP and ReceiveINTArray in the App Developer instead of an string
I hope it will work also that fast. For this array I already asked Ben.

https://flowcode.co.uk/forums/viewtopic ... 6227#p6227
I will post the result here

regards
Stefan

App Developer;
pooling_2022-03-31_16-19-34.jpg
pooling_2022-03-31_16-19-34.jpg (47.1 KiB) Viewed 1668 times
ESP32:
ESP32_irq_2022-03-31_17-46-03.jpg
ESP32_irq_2022-03-31_17-46-03.jpg (39.72 KiB) Viewed 1668 times

Post Reply