Register / Login  |  Desktop view  |  Jump to bottom of page

tcMenu Arduinio library » Disable 'Back to principal menu' and battery icon

Author: Mistercoenkel
30/06/2022 08:56:07
Hi , sorry for my bad english.

First thanks for this magic library lol.

I would like to know if it is possible to deactivate the return to the main menu?

I wish I could stay on the chosen menu until I didn't go back myself.

----

I would also like to know if someone has an example of icon for battery for 128x64 oled screen

I would like to have the battery icon on the top right like the wifi and connection example.

I tried to generate icons but without success.



Thanks

Author: davetcc
30/06/2022 09:55:30
As of the latest version you can register a menu manager listener. You can then control menu navigation as described here.

https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/menumanager-and-iteration/#listening-for-changes-on-menu-manager

In terms of icons they use the XBMP format by default, you can export from gimp in that format. It basically saves an array of bytes that you’d include in your sketch. You’d then use these with title widget for display in the right corner. There is more on that here:

https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/rendering-with-tcmenu-lcd-tft-oled/


Author: davetcc
30/06/2022 09:58:43
In terms of the XBMP you must make sure if using gimp that the current image is monochrome first. Again there are many guides online for that.

Author: Mistercoenkel
03/07/2022 21:25:32
Thanks for your response

Author: diysciborg
18/10/2022 07:36:11
I just made a battery icon set. They are 15 x 25 (the battery "stands upright")
It has 0, 25, 50, 75 and 100 percent filled icons.

Filename BatteryWidget25x15.h
Description No description given
Filesize 2 Kbytes
Downloaded 234 time(s)
[Disk] Download


Author: davetcc
18/10/2022 08:08:21
Many thanks for sharing the icons, they will be useful for others building battery-based applications.

Out of interest, if your system is battery based, did you try the low power support in task manager, where the call to task manager in loop tells you how long before the next task runs?

Author: diysciborg
18/10/2022 14:15:08
 
davetcc wrote: Out of interest, if your system is battery based, did you try the low power support in task manager, where the call to task manager in loop tells you how long before the next task runs?


No I have not. I will look into that. Im just learning to use TCmenu etc with this project.
If there is a wiki page or tutorial you can point me to, I would be very interested.

Unfortunately its sort of a rush project. But in my case, the user will have a power switch, and it will not be on all the time.
Power management is low on my priority list. Though, the device will have a "stand alone mqtt sensor" mode, which will need power management (IF I can implement it in time).
Once the event is completed, I will make a post about the project.

Author: diysciborg
18/10/2022 14:42:59
 
davetcc wrote:Many thanks for sharing the icons, they will be useful for others building battery-based applications.


By the way, im not sure if the tcc in your name means you work for tcc. If so, I found a small error on the guide page about using the icons:
https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/rendering-with-tcmenu-lcd-tft-oled/

the include line: #include "stockIcons/wifiAndConnectionIcons16x10.h"

The wifi icons are 16x12 (and the actual h file says 16x12)
this.. um.. can make a person crazy trying understand why it refuses compile with "no such file found" type of errors. smilie

Ask me how I know lol
admittedly it was a quick investigation.. but for a moment I thought I was crazy.

Author: davetcc
18/10/2022 19:51:25
For low power, we prototyped it with SAMD, here's the example, it's easy to migrate to another board.

https://www.thecoderscorner.com/products/arduino-libraries/taskmanager-io/task-manager-low-power-samd-example/

Ah OK, I'll look at the documentation, and fix the issue. The long-term plan is to open source the Arduino libraries section of the documentation so it can be edited by others. I just need to work out a way to actually make it work.

Author: diysciborg
19/10/2022 05:50:00
 
davetcc wrote:The long-term plan is to open source the Arduino libraries section of the documentation so it can be edited by others. I just need to work out a way to actually make it work.


That would be awesome.
As soon as this project is over, I plan to make a series of youtube videos explaining a lot of hints and tricks I picked up over the last two months.

Author: davetcc
19/10/2022 07:54:04
 
I plan to make a series of youtube videos explaining a lot of hints and tricks


That would be absolutely great.

I'm planning to overhaul the getting started video soon, as the current one is based on 1.7 and so much has changed. After that I'll try and break up the hosting package so Arduino libraries and the rest of the site are separate, with the libraries documentation in a github public repo.




Register / Login  |  Desktop view  |  Jump to top of page