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.
https://xod.io/libs/gweimer/traffic-light-advanced/
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).
https://xod.io/libs/gweimer/traffic-light-advanced/
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!
best,
~xodballxod~
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:
https://xod.io/docs/reference/supported-hardware/
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?