Improving Scratch -RaspberryPi GPIO Control Performance

The light at the end of the tunnel is getting a bit brighter 🙂

The reason my current scratch_gpio_handler.py doesn’t handle sequential variable changes is that Scratch codes them up differently (for efficiency) and that I need to use something like this https://github.com/pilliq/scratchpy/blob/master/scratch.py

to handle them.

Also, the CPU time used by Scratch seems to increase whenever you create more variables.  I’m assuming this is because it starts checking for changes in variables when RSC is enabled.  This increase in CPU load doesn’t seem to take place if using broadcasts so I’m going to change my python code to try and incorporate these two things and lets see if we can improve performance 🙂

You may also like...

Leave a Reply

Your email address will not be published.