I'm using Windows 7 64-bit, and I have a text file (C:\Example.txt) that contains some text, and I'm trying to transmit the contents of that text file to an Arudino Uno board.
Here's the example code on the board:
void setup()
{
pinMode(13, OUTPUT);
Serial.begin(9600);
digitalWrite(13, LOW);
}
void loop()
{
while (Serial.available())
{
char command = Serial.read();
if (command == 'A')
{
digitalWrite(13, HIGH);
delay(250);
digitalWrite(13, LOW);
delay(25);
}
}
}
I have a text file (C:\Example.txt) that just has the following in it:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
And from a DOS prompt, I'm trying to copy the contents of the text file to the Arduino via the serial port like this:
MODE COM3 9600,N,8,1,P
COPY C:\Example.txt COM3
Part of the data copies just fine, and I can tell that 5 of the 'A's have transmitted fine based on the number of times the LED blinks. But half the data failed to be received. I've tried to send smaller batches, and play with the COM port settings, but I haven't found a way to ensure all the data gets received by the Arduino.
Is there a way to just send text data from a DOS Command prompt to the Arduino board successfully?