help me receive data from 7 segment display

how do I get data from the 7 previous display segments I tried with digital read it can't, please help sorry for bad english

using arduino mega
5pcs 7 segment display

Delta_G:
You can’t receive data from a seven segment display. They are output devices, not input devices.

Since your code put that info on the display you shouldn’t need to read it. You should already know what you wrote to it.

Post your code and a more detailed description of what exactly your problem is. I know you think you can solve it by reading from the display but that isn’t going to happen. So describe the actual problem, not how you think you might fix it.

i want to show data to serial monitor according what 7 segment display / shown so i can send data to my mobile phone according data from 7 segment display

please help me im still newbie what should i can do

1. Let us assume that you have the following 1-digit cc-type 7-segment display system, and you have shown 2 on the display device. To see 2, you have sent this bit pattern 01011011 (0x5B) to PORTD and LOW at DPin-8.
atemp1R.png

The bit pattern is still present in PORTD Register. If you want to read them back, you can execute the following code:

byte x = PORTD;

2. Let us assume that you have the following 2-digit multiplex display system, and you are showing 35 on the display unit. Can you read the cc-codes back that you have written on PORTD for the digits 3 and 5? You can't; because, the values of PORTD are continuously changing. If you really need these data, you must keep a copy of the data in variables.
atemp2Rx.png

atemp1R.png

atemp2Rx.png

Which seven segment display? Post links to the product page, or a photo.

jremington:
Which seven segment display? Post links to the product page, or a photo.

its from machine and they will shown to 7 segment and i want to take data from 7 segment based on that machine

The photo posted in reply #6 seems to show that you are displaying numbers on that LED display.

So, you already know what those numbers are.

jremington:
The photo posted in reply #6 seems to show that you are displaying numbers on that LED display.

So, you already know what those numbers are.

i need to led display data shown in my arduino or send that data to my arduino because that LED will be covered so i cant see that LED display

Delta_G:
Sure, but the Arduino sent the numbers to the display. So the Arduino already knows what numbers it sent. You don't have to read the display. Just look at the numbers you sent in the code.

int myNumber = 123;

// some code that puts my number on the display

// Now I want what's on the display in myReading
// But I don't have to read the display
// It's the number I wrote to the display and I already have that

int myReading = myNumber;  // got what's on the display.

sorry sir its my fault , LED display shown based by another machine not by arduino , so arduino didnt know what led display because led display from another machine sir

It can be a very difficult problem to connect Arduino input pins to equipment that is powered separately, so unless you can find someone who really understands "ground loops", "phantom powering" and all the other things that can go wrong, and is willing to reverse engineer the other equipment, don't try to do so.

jremington:
It can be a very difficult problem to connect Arduino input pins to equipment that is powered separately, so unless you can find someone who really understands "ground loops", "phantom powering" and all the other things that can go wrong, and is willing to reverse engineer the other equipment, don't try to do so.

so absolutely we cant get data from LED display right? so i need to another way to get that data thankyou sir

so absolutely we cant get data from LED display right

Of course you can. But you will need electronics expert help to interface the equipment with an Arduino.

Or use a camera and number recognition software on a PC.

Delta_G:
So why the hell didn't you say that when I asked?

sorry sir , so what i gonna do sir ? any solution for me to get 7 segment display with camera or something?

Delta_G:
Stop calling me sir. I always know the messed up threads because there's someone overusing the word sir. I'm just a regular guy. Some of the people here are even women. Calling everyone sir isn't nice or considerate.

I don't know what you're going to do. It sounds like you've been given some good ideas.

nah im sorry, i just flustered because its difficult to show LED display to my arduino

its my school project and i need to pass this exam

What exactly is driving the 7 seg display ?

UKHeliBob:
What exactly is driving the 7 seg display ?

now i want to receive data from that was previously obtained from that machine and show 7 segment display with rs232 connect with mx232 to my arduino
so based in order machine -> with rs232 -> mx232 -> arduino connect with tx and rx -> in serial monitor show exactly same with what 7 segment display

can it succeed?

Yes, I think thats the only way to do it but. If the display just shows one type of data like pressure then all you need are the numbers. If the display shows pressure then temperture then etc...then you will also need what the numbers represent. Do you have access to programming the machine ?

now i want to receive data from that was previously obtained from that machine and show 7 segment display with rs232 connect with mx232 to my arduino
so based in order machine -> with rs232 -> mx232 -> arduino connect with tx and rx -> in serial monitor show exactly same with what 7 segment display

So you don't want to

receive data from 7 segment display

at all. You want to display the information that was displayed on the 7 segment display.

What do you know about the 7 segment display ?
Is it common anode or common cathode ?
How many input pins does it have and are they labelled ?

UKHeliBob:
So you don't want to at all. You want to display the information that was displayed on the 7 segment display.

What do you know about the 7 segment display ?
Is it common anode or common cathode ?
How many input pins does it have and are they labelled ?

common anode , 7 pin a b c d e etc , yes labbeled

so based in order machine -> with rs232 -> mx232 -> arduino connect with tx and rx -> in serial monitor show exactly same with what 7 segment display

In light of what we now know that is not going to work.

You could perhaps read the state of each of the segment pins using an Arduino and determine what number was currently being displayed then transmit it to another Arduino for display but it would not be easy. Does the display change very rapidly or is it relatively static ?

UKHeliBob:
In light of what we now know that is not going to work.

You could perhaps read the state of each of the segment pins using an Arduino and determine what number was currently being displayed then transmit it to another Arduino for display but it would not be easy. Does the display change very rapidly or is it relatively static ?

display change relatively static