Hello dear developers, do you have any developments or examples of building menus for 1602 (2004)? would be very grateful and examples of timer implementation on display
I’m considering making something like this for my project, but haven’t decided if I need it. What kind of strategy did you have in mind? What have you researched, already? There’s already information on this subject in this very Forum? What kind of menu selection and tree and function did you have in mind?
I am trying to do a 4 channel PID with settings and and a running timer. There was a big question about the implementation of the timer and the formation of the menu, as I understand the timer is built from small logical blocks, then you need to somehow display it in the display with the ability to edit
I’ve implemented PID in XOD, and it was super easy. It updates on the loop. You simply wire the out put to your control system, and you wire the PID input with the setpoint signal. If you want to control your loop-speed, then you use “Clock” node into some pulse node on your sketch. You can further control flow by using defer nodes, and there’s a node in gweimer/utils library called “all” that waits for all the pulses to come in. To reset anything, like a timer, then wire a button to the RST pin.
There’s also a whole thing about “MUX” (Mutex) that control program flow.
Are you trying to put knobs onto the PID parameters? And have that output to the LCD? So, you coudl, for example, change the PID parameters with an Encoder/Buttons?
I’m not clear on how your timer fits into all this? Is your timer counting up? Or down? Is the time defined by the user? Or the software? What is the timer even timing? I’m interested in helping, but you have to be more specific. Maybe draw a sketch of what you’re trying to do?
Like, how many buttons and knobs to you have to work with? How many LCD’s? What do you want to show on the screen? What the menu structure you want, and what do you want it to do? How do you want to interact with it? Where’s the schematic for what the data flow look like? How many of what? What do they do? How do you want it to work? The problem needs more details.
Plus, you still didn’t attach any xodball file.
Here’s a sketch of a way to cycle through some PID values…
Here’s a 2D structure for a menu:
here’s the code
nth-select-menu-structure.xodball (15.0 KB)
Re-arranged for flavor
You are an amazing person, you have an amazing design, I need a timer for the task and adjusting the operating time of 2:00 pm and adjusting the coefficients, I plan to do the control on the encoder (3 buttons) and the display on the i2с.
I apologize for the long answer and thank you for your responsiveness, I will deal with the project in 2 days.
It looks like the timer you’re talking about is actually a “Real Time Clock”. You need an I2C RTC.
For adjusting PID parameters with the the buttons, you gotta get in the menu mode… Maybe use the Line 1 to select the mode (which explicit PID parameter), then adjust it on Line 2. A state machine may be a good way to go with for that, and @gweimer has given excellent examples of “traffic light
advanced” (actually some of the most impressive work I’ve seen).
The strategy for the digits is to parse the value on the decimal “.” , and handle the integer and the fraction separately. Green light for the integer, yellow for the fraction, and red light for the storage of the value in a buffer or new FRAM memory (We could use the #SDread, if someone could figure out how to read a file and parse out data into an array (would want variadic node out!!!)).
In any case, these topics are covered in the forum. I’m searching for “adjust” or “adjust value” or “display adjust” or “RTC” or “clock”
Take a crack at it, and see what you can come up with. I know you can do it!
I thought the clock could be implemented programmatically, but so there is only a ds1307 chip available, do we only need i2c or with a pulse output?
Arduino doesn’t do clocks well on its own. It only counts milli-seconds since boot, and the counter over-flows after a short period of time. Technically, you probably COULD program a clock, but it is going to be difficult, and it is not going to be all that accurate. Arduino can interface with Real Time Clock (RTC) modules designed for accurate time-keeping. Depending on the module chosen, there will be a way to set the time (should only be needed once; the RTC module will remember time after that, even when power is removed using its own battery), query the time, and maybe set alarms. To support this functionality, I2C interface is usually used to connect to RTC modules.
Thanks for the clarification, which module would you recommend for time reporting?
Is ds1307 with non-volatile memory suitable for i2c?
List of Hardware Here:
any ds1307 i2c should work, fine.
Guys, I assembled the ds1307 module, looked at the nodes, so it’s just a real time clock, I need an adjustable timer for 1-180 minutes (approximately) to set the pid time work , can it be implemented on simple nodes without ds1307, or I don’t understand something ?? ?
test project.xodball (20.0 KB)
Is there a reason you cannot use ‘delay’ node for a timer?