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 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s