Led display with external input

Have a project with 2 totally separate Nanos. #1 to run a stepper with positions. Works well. Would like to have a second nano to run a 4 digit led display code is ok
My question is when a pin goes high on #1 the #2 sees it and with code puts position on display. Can I use an opto isolator for each pin in use for each.position. When the #2 sees this with code enters the number on display. Is this the simplest way ?
Don't want it all on one nano. Thanks
Hi

The simplest way would be to connect a pin on Nano #1 to a pin on Nano #2 and to use digitalWrite() and digitalRead() and a common GND connection. No opto isolator needed

Of course, that supposes that you need 2 Nanos in the first place

1 Like

Hi UKHeliBob

Thanks for your message. Appreciated.
Keep in mind I a m reasonably new to Arduino ( read slow to comprehend!)

The Nano #2 for the led display is not always going to be used with the #1 project. So I can use #2 if project required. Essentially stand alone, and easy to install anytime without having to change original project sketch etc.

Have already used a lot of pins on #1 and would require a multiplexer to handle a display. So my thinking is, keeping in mind that display not always used, that a Nano #2 would be easier than a multiplexer.
Your comments would be appreciated.

Charles

Also it intrigues me to see if the opto or equivalent would work or not. Could be useful in other ways also.

How many pins on Nano #1 do you anticipate being connected to Nano #2 ?

Hi
Thanks. How does that work. How does the message reach #2? Would rather not use a communication ic2 etc. Just keep it simple.

From Nano #1 there would be 5 buttons, when any one pressed Nano #2 receives and places number on display. Only one at any time.
At this point say 5 . Maybe more in later projects.

Thankyou

Charles

Send a single character over a SoftwareSerial link. Read and interpret it on Nano #2 and act on it based on what has been received

Letters 'A' to 'Z' would give you 26 different messages and ASCII characters are easy to convert to a number from 0 to 25

Hi

wow that sounds straight forward.
Are you able to advise a suitable url that explains how to do , code etc. If a project does not require the link to #2 how to turn off, or will it just go nowhere, which is what I want.
I will do some googling also.
Thankyou
Charles
Heading into July in the morning here in New Zealand

Have you got the 7 segment display working on a standalone Nano ? Do nothing until you have that working

You will find zillions of online tutorials on how to do it, mostly counting up and/or down. Get that working first

If you use a Serial link them #1 to #2 it will not matter if #2 is not connected

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.