Replies: 3 comments 1 reply
-
Thanks for working on this. Any link? Just for reference, there seem to be similar projects on the web, maybe with different focus:
|
Beta Was this translation helpful? Give feedback.
-
I will clean up the code a bit, to make it less indecent, then I will share it. The other projects look interesting, I will check them. They are probably much more refined than mine, which is just a quick DIY solution. |
Beta Was this translation helpful? Give feedback.
-
I created a repository: https://github.com/vanniaz/embedded_display_sandbox |
Beta Was this translation helpful? Give feedback.
-
I wrote a small Arduino project, and a companion Windows app, to speed up the process of getting a good looking display page.
Sometimes you need to make several small adjustments: move a text by a couple of pixels, use a slightly different font etc. Then you recompile, reflash and look at the result. If you are not satisfied you repeat these steps, but this can be time consuming.
So the idea is, before uploading your real firmware to the target MCU, you upload a "sandbox" firmware that acts as a command interpreter. On the PC side you write a "script" with the graphics commands, the Windows app sends these commands to the MCU which translates them into u8g2 commands.
If you need to adjust a value, you only have to change it inside the Edit box of the app, and click "Send" again. In a couple of seconds you see the effect on the target display, no need to recompile and upload.
Once you are satisfied with your display page, it is straightforward to put the same commands in your source code. For brevity, I used short command codes in the script (less characters to type!) then of course you will have to use the complete syntax in your source code.
An example:
DVL 10,20,30 in the script translates to the u8g2 command drawVLine(10, 20, 30)
This translation could be automated, by adding a "generate source code" function in the app.
The Arduino project and the Windows app are just a quick and dirty solution, I only have implemented a small subset of the available commands, however it is already a big help for me. I will be happy to share my code if it can be of interest to others, and possibly be improved by collaboration. Let me know your comments/questions.
Beta Was this translation helpful? Give feedback.
All reactions