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

WIP: Update game snake to check oled state with new format #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

robertlayton
Copy link

Update the snake game to run, as the OLED interface has changed.

WIP: the game now runs, but its weird and buggy, which I'm working on now

@geekscape
Copy link
Owner

geekscape commented Jan 24, 2021

Thanks @robertlayton, with so much to do, I dropped / paused working on this game example. Didn't even get to integrating with the Aiko framework :( So, thanks very much for pushing this along !

With microPython, we can only get 20 FPS per OLED. Don't have to always update both of them, but if we do ... results in an effective rate of only 10 FPS maximum. Also, some processing time is still required to manage Wi-Fi, MQTT and other things. So, expect that 5 to 8 FPS ... that would be 5 to 8 calls to aiko.oled.oleds_show() maximum each second.

I recommend temporarily hacking in a print() statement into aiko.oled.oleds_show() ... to give you some clues as to how often the OLED screens are being refreshed ...

from time import ticks_ms
def oleds_show():
  print("oleds_show(): " + str(ticks_ms() // 1000))

I'll wait for you to mention that the "weird and buggy" bits are no longer a problem. Thanks again !

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

Successfully merging this pull request may close these issues.

2 participants