Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance Test: Picod with a raspi3B+ #3

Open
bsense-rius opened this issue Apr 16, 2022 · 1 comment
Open

Performance Test: Picod with a raspi3B+ #3

bsense-rius opened this issue Apr 16, 2022 · 1 comment

Comments

@bsense-rius
Copy link

I've been testing the picod connected to a raspberry pi 3B+.

I've used the tick function in a loop (for write and read) with this scheme.
status, t1 = pico.tick()
pico.gpio_write(4, 1)
status, t2 = pico.tick()
res = picod.tick_diff(t1, t2)

I've seen that the write avg time is 15ms, and read avg time is 28ms (despite the 230400 bps of the serial port). I guess that is doubling because it requires sending the read request, and waiting the response.

It's fair but I wonder where the latency is generated. It is due to the raspberry pi 3B+? or is it in the picod? Is there any means to reduce it? An alternative could be to implement asyncio / awaitable read / write could avoid this "micro blocks".

Thank you for your attention

PS: I know we cannot compare it to pigpiod. I made similar tests with raspberry pi 3B+ with its GPIO and achieved outstanding values of 0.66ms for writes, 0,77ms for reads

@joan2937
Copy link
Owner

I rather lost interest in picod when the API broke and I could not rebuild the daemon. Currently I am concentrating on other activities.

Just about every API call has a reply parameter which can be set to one of the following values.

REPLY_NONE = 0
REPLY_NOW = 1
REPLY_LATER = 2

You could use REPLY_NONE for GPIO toggling (although in practice you'd probably use PWM).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants