I am working with a project using Mega 2560. I have so many readings, that already have tabulated. I want to control the output pins (say LEDs) according to these values. How can I interface those data in my PC with the board?
Sometimes I need to take the error value by comparing the tabular value and sensor value from Mega. Based on these errors also I have to manipulate my outputs.
Anyone can help me in doing this?
If I understand you correctly then you have a file on the PC containing data that you wish to communicate to the Arduino to act on. Is that correct ?
If this is the case then how often/how many times do you need to do the data transfer ? Is this a one off, such that a quick/dirty solution would be acceptable or is it an ongoing requirement needing a more sophisticated solution ?
How far apart will the PC and the Arduino be? If they are close (~2 metres) then you can use serial to transfer data between them over the USB cable.
If they are a bit further apart, but still in the same building (~15 - 30 metres) then you could use a wifi shield or breakout on the Arduino to send and receive data from an application server on the local network.
If they could be anywhere, then you could use a 3G shield or breakout on the Arduino to send and receive data from an application server on the web.
@anoop8392, you have really provided very little information about what needs to happen - for example, will the Arduino send data to the PC so that the PC can do some calculations and send some other data back to the Arduino.
This Python - Arduino demo may be of interest. It illustrates 2-way communication between an Arduino and a PC.
The Python code could be adapted to read data from a file on the PC.
...R