Message |
|
No problem, are you all good with it now?
|
|
|
We'll also look to add this example in 2.0 if Uno has enough memory to allow for it, if not we'll add the example for Mega2560. I think as odd as it sounds, the nano 33 ble example does use a common I2C 20x4 display.
|
|
|
I'm not sure if an I2C LCD will fit on an Uno board along with task manager and everything else. I mean LCD I2C on its own is 10K before task manager or tcMenu are brought into play. For Uno, we normally recommend using a DfRobot LCD shield, or using an LCD display with direct wiring. I think the SSD1306 ASCII support also fits well. In 2.0 when we release it soon, we've actually made some improvements, and got an Uno DfRobot menu down to 23K, that would probably just about allow I2C, but then what about your own code.
One important point, as per the documentation you need to determine if your display is RS first or EN first, and set it as such in the code generator, see https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/tcmenu-plugins/liquidcrystalio-hd44780-renderer-plugin/ particularly the section on "Commonly available I2C".
I quote from that page:
PIN_LAYOUT: I2C displays mainly fall into two categories, either with EN on pin0, or RS on pin 0. Try each of these if you are not sure. If your display does not work with either, use the above “display direct or non standard i2c option”.
|
|
|
Hi there,
I just had a look at the code, I think there's a very simple fix for this until tcMenu2.0 comes out. This is because in 2.0 dialogs are made up of menu items so render exactly the same.
I'm assuming U8G2 here.
For now open tcMenuU8g2.cpp in your project (it was put there by the designer), and search for void the following text: U8g2Dialog::internalRender(int currentValue)
Now you are in the function that draws the menu, until 2.0 gets a bit further along, I suggest that around line 321, the wrong font is being used to draw the title, the line looks like:
graphics->setFont(gfxConfig->itemFont);
change it to
graphics->setFont(gfxConfig->titleFont);
Also same on line 326, it's using itemPadding instead of titlePadding.
Another quick fix would be to add a bit to variable "dlgNextDraw" that you see in that method.
You'll need to repeat that change every time the generator runs, but it's quite a simple change, and tcMenu 2.0 is now just around the corner basically.
|
|
|
|
|
|
We've made some large strides in the 2.0 release, it's not so much about the size of the release, it's more about going back and making things right. More unit testing across the board, starting to put automated testing on the Windows UWP UI, and trying to ensure that things are sustainable for us going forward.
As of now, we have beta versions of all the designer UIs being tested. We consider them feature complete, and once testing is finished, they will be promoted to release status.
A couple of points for 2.0:
* We now have an "Uno" mode for liquidcrystal plugin that uses about 23K FLASH for our Uno dfrobot example. It's astonishing that the full power of our libraries can be utilized on such a small device.
* The Linux and Win7/8 UI has now caught up with the App store versions and is very close in functionality. They are both packaged and very easily installed.
* We've managed to make tcMenu lib 2.0 backward compatible in 99% of cases without even a designer round trip. We've tested the major plugins in all version combinations.
|
|
|
Yet another build, this is the big one, it brings the Linux & Win 7/8 designer up to the same functionality as the Win10 and Mac versions.
BETA V3
- Adds some extra support to the code generator ready for the 2.0 plugins.
- Moves the properties for a plugin over the right of the plugins, instead of the old table system.
- Support for proper full copy and paste in the tree along with bulk delete that can be undone.
https://www.thecoderscorner.com/products/apps/tcmenu-designer/
|
|
|
Let me know how it goes once you've got the versions I suggested. It should be quite natural in terms of direction movements for both value adjustment and scrolling.
Also, did you try the new packaged Linux version? It has another upgrade coming very soon that gives it the same functionality as the Windows and Mac one: proper copy and paste, support for undoing bulk removals. With those changes, it is close to feature complete.
We've been testing it fully on a couple of new Ubuntu VMs we've created.
|
|
|
8085, that takes me back a while, I used to write 6502, 68000, and 8086 assembler going back many years before I started learning C.
I can't seem to come up with the right syntax to cancel it. I want to Cancel the pattern moving/stepping When a new key is pressed
When you want to cancel a task, you pass the ID that was returned when you added the task. For example:
auto myTaskId = taskManager.scheduleOnce(100, somethingToSchedule);
taskManager.cancelTask(myTaskId);
|
|
|
> I do not know the syntax for "getkey / input key", or how (or where in the code) to send that value to a case statement.
The keyboard manager is event-based, so rather than get key, it tells you when a key is pressed, you could implement modal operation in your keyboard listener class yourself (fairly easily), but it's not implemented by default.
> Example: key “1” is pressed and all the LEDs in the strip turn red using FastLED. key “2” is pressed and all the LEDs in the strip turn blue, and so on.
In the easiest case, adjust the key pressed or key released of the keyboard listener you would have switch statement that did something when the key-press or key-release was 1 and something else when the keypress was 2, for example here's a rough incomplete example to get you started (in the example we ignore keys being released):
void doFunctionForOne() {
// take action when 1 typed on keypad
}
void doFunctionForTwo() {
// take action when 2 typed on keypad
}
class MyKeyboardListener : public KeyboardListener {
public:
void keyPressed(char key, bool held) override {
switch(key) {
case '1':
doFunctionForOne();
break;
case '2':
doFunctionForTwo();
break;
}
}
void keyReleased(char key) override { }
} myListener;
|
|
|
I've attached an image with the row that you want to provide the esp touch IoAbstraction in.
|
|
|
In the desginer, when you select ESP WIFI as a remote capability, the limit of the listen port is 65355. I think it shuld be the maximum 16 bit value (65535, 2^16-1)
Thanks, that is a bug, I will fix that typo for the next version.
I have understood that the correct election is the <>. All is working as expected, I think.
So in your sketch you'd create the touch Io expander EG
ESP32TouchKeysAbstraction* esp32Touch = new ESP32TouchKeysAbstraction(TOUCH_threshold, TOUCH_HVOLT_2V7, TOUCH_LVOLT_0V5, TOUCH_HVOLT_ATTEN_1V);
Then choose "Control menu with UP/DOWN buttons" and in the IoExpander provide 'esp32Touch', the buttons numbers are 0..9 for each touch-capable pin.
The only problem I've found is that the up and down buttons seems to be interchanged. If I push UP, the little arrow in the menu goes DOWN.
From Arduino / pio library manager Make sure you are on tcMenu 1.7.1 and the IoAbstraction 1.7.3 too, these have a fix for joystick navigation to make it more natural.
|
|
|
Also, let's say that you handled the interrupt as an event, you could either marshall the interrupt by using the task manager interrupt support, or you could have a raw interrupt handler instead and just trigger an event in the raw IRQ. As long as your sleep method woke up on the interrupt, set the event as triggered, then all should be good.
As with all signals, you should probably wake up occasionally and make sure that all state is as expected. You could add a task to task manager that scheduled every N seconds (or whatever was tolerable) that ensured everything was in a good state.
I would take a look at the events and interrupt sections of https://www.thecoderscorner.com/products/arduino-libraries/taskmanager-io/
|
|
|
This is an advanced topic. There are so many possible combinations that it is probably beyond the scope of the forum to discuss them all.
However, task manager execution is driven by the runLoop() method, which you would normally call in the main() or loop() method, it checks if any tasks are ready to be executed and executes them if needed, it also evaluates any events if needed.
As you rightly pointed out below you can use microsToNextTask along with a low power library or call, to avoid busy waiting by repeatedly calling the runLoop method, in fact there is an example of this for SAMD here: https://www.thecoderscorner.com/products/arduino-libraries/taskmanager-io/task-manager-low-power-samd-example/. A major point to consider is that you must make sure that if you want to process interrupts, that the processor would be awakened from the sleep by that interrupt.
I would say the best way unless it doesn't work is to follow something similar to the example above.
|
|
|
I don't think it can do 0 decimal places at the moment, the assumption was that people who needed an absolutely accurate value used large number, because floating-point values on any CPU are not accurate. https://dzone.com/articles/never-use-float-and-double-for-monetary-calculatio. In particular they cannot represent certain values and then you end up with the nearest interpretation. However, we'll make it possible to set it to 0 decimal places in the 2.0 release as it's trivial to do.
Many times people don't understand floating point types and expect accuracy.
The best type to use for very large whole numbers is editable large number, if you don't want it editable, then set it readonly. See https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/menu-item-types/largenum-menu-item/ that covers this type in detail. In your case, you would just set the whole number, clear the fraction and the negative flag would be false.
Eg something like:
LargeFixedNumber* numCycles = menuCycles.getLargeNumber();
numCycles->setWhole(myNewCycles);
numCycles->setFraction(0);
numCycles->setNegative(false);
|
|
|
|
|