One LCD + 2 counters

Hello,

I'm new to this Arduino world and my knowledge of what it can do is limited.

Hardware :

  • Arduino UNO R3
  • LCD 1602
  • 2 x potentiometer

I was wondering and correct me if I'm wrong, the Arduino UNO R3 can only execute one task at a time but we can program it so it can execute multiple tasks one after the other. My question is, can I use 1 LCD with 2 counters on the screen and control each one with its potentiometer since it's a 16 digit by 2 rows? Example:

Row 1 - Count 1 Count 2
Row 2 - 0 0

Thank you,

sure you can.

1 Like

Yes, essentially you'll need to use the loop function to continuously read the two pots over and over listening for changes. Then if something does in fact change, increment or decrement the counters and update the LCD accordingly.

You probably don't want to be continuously updating the LCD in the loop as it can cause it to slow things down and flicker the display. So writing to the LCD only when needed is a better approach.

1 Like

..or writing every 300~500ms.

1 Like

This is great then, I will give it a try.

Thank you so much for your answer :slight_smile:

Thank you :slight_smile:

You can switch back and forth between 2 (or more) tasks so quickly that it looks like the tasks are simultaneous.

See:
Several things at a time.
Beginner's guide to millis().
Blink without delay().

1 Like

Thank you :slight_smile: