Page 1 of 1

App Developer Comport How to use interrupt

Posted: Wed Mar 30, 2022 9:26 am
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 1766 times

Re: App Developer Comport How to use interrupt

Posted: Wed Mar 30, 2022 3:08 pm
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.

Re: App Developer Comport How to use interrupt

Posted: Wed Mar 30, 2022 4:33 pm
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.

Re: App Developer Comport How to use interrupt

Posted: Thu Mar 31, 2022 4:52 pm
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 1729 times
ESP32:
ESP32_irq_2022-03-31_17-46-03.jpg
ESP32_irq_2022-03-31_17-46-03.jpg (39.72 KiB) Viewed 1729 times