I2c lcd 16x2, message switch via button

hi guys,

I’m new to xod and i have a a problem concerning a i2c lcd.

“project”: the lcd displays a message, when a button is pushed the message is whiped and a new message is displayed on the lcd.

How can i achieve this? i can’t find a clear screen node, the attempts i made resulted in the 2 messages blinking and overlaping eachother.

Can anyone help? thanks!

Hi, can you upload a xodball with what are you doing? Insert some comments of the sequence you want.

The LCD node clears any line it writes to. It sounds like you are using 2 LCD nodes and they are fighting for control. You need to rewrite your code to only use 1 LCD node and change strings being fed to it. A select node could be used to feed the lcd input.

1 Like

Hi gweimer,

Thanks for the reply, that’s indeed what i did and what’s happening. i don’t know if a select node will do the job.

This needs to be part of the ui, welcoming menu. So the first message for example “welcome, press next to continue” when the next button is pressed, the next message is presented and the first is never shown again until the power is turned off and on again ofcourse.

Could you help me with this if it’s not to much to ask?

thanks in advance!

Sounds like a perfect use for select node. Select node defaults to displaying one message (I believe the far-right option), so that would be your welcome message. The next button would be tied to the pulse pin for the next message. You can expand the select node to add additional messages that receive pulses from other buttons, or timers, or logic code to count button presses, or…

oooh i din’t see that i could expand this node, thank you so much!

i’m very sorry to bother you again, would you mind drafting it up and posting it here? I’m an absolute beginner when it comes to coding and i can’t seem to figure it out :frowning:

this is what i have so far… the first message is displayed, but when the button is being pressed nothing is happening…

I would expect “test page 2” is always shown… I think the button is not being read at all. Do you set up its PORT correctly? Also, does it have a pull-up resistor in hardware?

Anyway, to change the message on button click, link the PRS output to S2, not DONE.

hi nkrkv,

Yes, when selecting the node for the button i put in the correct port no. And i pulled it up with a 10K resistor. After changing the output to prs it still doesn’t work… Any suggestions?

Could you add a watch on PRS and run with debugger to verify the button is indeed sends correct boolean signals?

the debugger show’s no data, just “debug session started”

try this,with DONE to s2 also works

cesar. what deferen, betwen node select and 4051multiplexer

In the select node, you will need a pulse to select each channel(x1,x2,x3…), in 4051 the selection is numeric by SEL(0 = CH0, 1 = CH1 ....

1 Like

I have also read your comment on another topic. which is about 4051 multiplexing. and you recommend using the nth-input node. can you explain about that thanks

nth-input works very well but being a “node-patch variadic” resource consumption is very high and in my case I could not use it. I made one node whose name “dataselect” works the same and consumes less resources. It is a personal opinion, after doing many tests.

means it can be concluded better using dataselect. okay cesars thanks for the explanation

Ideally, use the native node in this case nth-input, now if it is limited in resources you can use dataselect, maybe later nth-input will change. They work the same, they are the same, but one is in patch mode of nodes and the other is in c ++

connect input to node nth input, what node is needed? I’m tired of trying it. can you give an example?