adafruit / Adafruit-GFX-Library

Adafruit GFX graphics core Arduino library, this is the 'core' class that all our other graphics libraries derive from
https://learn.adafruit.com/adafruit-gfx-graphics-library
Other
2.39k stars 1.54k forks source link

Online Playground for the Adafruit GFX Library #283

Open urish opened 4 years ago

urish commented 4 years ago

I took the ssd1306_128x64_i2c example and turned it into an online playground on Wokwi, an Arduino teaching platform I'm working on.

The playground allows you to run the code in your browser, using an Arduino AVR simulator, so you can learn how the Adafruit GFX API works and experiment with it right from your browser, without the need to pull and connect an Arduino board to your PC:

https://wokwi.com/playground/ssd1306

I also created another example with the Tamaguino game, which also uses the Adafruit GFX library:

https://wokwi.com/playground/tamaguino

I'd love to get your input on:

  1. Does it work well for you?
  2. Does it feel intuitive?
  3. Which use cases come to your mind?
  4. What else would you like to see?

Thanks!

ddlsmurf commented 3 years ago

In my case, the dino has a display issue (like it's shifted right by half a screen) image - but the first example works well.

Yes it's intuitive. It's exciting to me if you can support more screens, I would use this to play around with rendering code without flashing a device at each test. Thanks !

urish commented 3 years ago

Thanks for the feedback @ddlsmurf!

First the tamaguino example, does it work well for you now?

Which other screens would you like to see supported?

ddlsmurf commented 3 years ago

Yup works fine now - the timer in the top right is very annoying though it really needs a fixed width font. The screen I'm playing with now is 200x200 but ideally it could be cool to just pick any resolution

urish commented 3 years ago

Regarding the timer - the font should be fixed with. This is what it looks here (Chrome on Windows):

https://user-images.githubusercontent.com/892318/116008818-29c67100-a61f-11eb-8c5c-cb3024199571.mp4

Does it look different for you?

What model is that screen?

urish commented 3 years ago

Update: I managed to reproduce the jumpy timer issue on Safari and uploaded a fix. Does it work better for you now?

ddlsmurf commented 3 years ago

Perfect =) Impressive work alltogether.

lemonkey commented 3 years ago

@urish Thanks a lot for this. Dramatically sped up some of my development work. Is there a way to simulate Serial.print statements?

urish commented 3 years ago

Yes, they should work out of the box. e.g. https://wokwi.com/arduino/projects/305978006798598721