Go Down

Topic: µGUI - Another Graphic Library (Read 3956 times) previous topic - next topic

achimd

Dec 16, 2014, 07:06 pm Last Edit: Dec 17, 2014, 12:55 am by Coding Badly
I also wrote a library which supports nearly any display technology: µGUI

http://www.embeddedlightning.com/ugui/


µGUI is a free and open source graphic library for embedded systems. It is platform-independent and can be easily ported to almost every microcontroller system. As long as the display is capable of showing graphics, µGUI is not restricted to a certain display technology. Therefore display technologies such as LCD, TFT, E-Paper, LED or OLED are supported. The whole module consists of two files: ugui.c and ugui.h.

This might be helpful as well :D

keeper63

This is actually pretty nice; I am kinda concerned about the amount of RAM the fonts would take up - I suppose the code could be modified for the Arduino's case to use PROGMEM or something along those lines - and you likely would only enable one or two of the fonts.

I also love the great documentation (so many authors skimp on this).

As far as any suggestions I can offer:

1. Move the code and development to a github repo or similar - it will make for better development, and make it easier for others to contribute changes/updates.

2. Add a "draw grid" function - allow for different step-rates in both horizontal and vertical dimensions (or, maybe your "draw mesh" function could be extended to cover it?).

3. Document the format and storage of the fonts; it might also be nice to provide a font editor (one made in javascript, using the canvas would be perfect - cross-platform and easy to use).

I'm sure I could offer a ton of other options, but for something like this, it should be kept as lean as possible - which I would say you've done a great job with! I like how it is display agnostic, and you only need to pass in the function pointer to a pixel drawing function - and everything else is taken care of. Your functions for drawing lines, circles and arcs are all interesting (all using Bresenham algorithms) - though I tend to wonder if you couldn't simplify the circles and arcs down to a single arc algorithm where you pass in start/end "degrees" or similar - that way you could build pie charts and such as well...

Well - anyhow - great job! I like it!
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

achimd

I suppose the code could be modified for the Arduino's case to use PROGMEM or something along those lines - and you likely would only enable one or two of the fonts.
This will be possible in v0.3 - the memory location of the fonts will be selectable.
Have you seen that each font can be enabled / disabled separately?

1. Move the code and development to a github repo or similar - it will make for better development, and make it easier for others to contribute changes/updates.
Actually, I want to do this. But not now. Please give me some time for this.
Until then, please post any suggestions on my website or send me an email.
Any help is greatly appreciated!

2. Add a "draw grid" function - allow for different step-rates in both horizontal and vertical dimensions (or, maybe your "draw mesh" function could be extended to cover it?).
Good Idea! Yes "UG_DrawMesh" is able to do that - so this will be available in v0.3 as well :)

3. Document the format and storage of the fonts; it might also be nice to provide a font editor (one made in javascript, using the canvas would be perfect - cross-platform and easy to use).
This is already a point on my ToDo-List. I will release a font editor in the future.

Again, thanks a lot for your suggestions! Do you have a project using µGUI? I really (!!) need some project pictures to show on my webpage. I only have videos:
https://www.youtube.com/playlist?list=PLn9k3eL_sqV1Y1FwUu0qFC6u7m6rQe9_V

Achim D.


achimd

@Admin: Could you please move this topic to the Display / OLED section (http://forum.arduino.cc/index.php?board=7.0)?
Since this is a library for all kinds of displays, I think this would be a better place.

Coding Badly


achimd

I don't understand why the u8g-lib is located in the display section and µGUI isn't.
In my point of view this is not consistent.
Anyway, you are the admin :D

Coding Badly


Because the moderators don't always identify topics that should be moved and it is very unlikely that u8g-lib will ever be moved because people expect it to be where it is.

If you really want your topic moved I will but I suspect it will get more eyeballs over a longer period of time here.


achimd

Ok, now I understand.
No no, leave it here...
I just wanted to ensure that µGUI is not off-topic here. 8)

Thanks!

robtillaart

Just come up with regular improvements and you will be in the spotlight ;)
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

keeper63

This will be possible in v0.3 - the memory location of the fonts will be selectable.
Have you seen that each font can be enabled / disabled separately?
Yes, I did notice that; it just seemed like even with the smallest font, it would take up quite a bit of an already limited memory in say, an Uno (though I didn't calculate how much). It's good to know that this will be updated in the future, though.

Actually, I want to do this. But not now. Please give me some time for this.
Until then, please post any suggestions on my website or send me an email.
Any help is greatly appreciated!
Yeah, no problem; I was just mentioning it - if you already have plans in that direction, then great!

Good Idea! Yes "UG_DrawMesh" is able to do that - so this will be available in v0.3 as well :)
Nice! That will be a help to those who want to have some kind of scale or such for graphs or plots, without having to write their own routine (simple though it may be).

This is already a point on my ToDo-List. I will release a font editor in the future.
That sounds great, but I would love to see it cross platform, which is why I suggested an HTML5/javascript solution. So often, tools get released for things like your library, and are only developed for Windows, and maybe the Mac - but Linux (and any other potential current or future platform) gets left out. Write it as an HTML5 standalone page/app that can be loaded into the browser, and it becomes available to for use by everyone.

Again, thanks a lot for your suggestions! Do you have a project using µGUI? I really (!!) need some project pictures to show on my webpage. I only have videos:
Unfortunately, I don't - but I am sure many others here probably do, or will. Whether they use your library, of course, is up to them.
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Go Up