Why is my Arduino Uno not receiving data and how can I fix it?

  • Thread starter Thread starter lcr2139
  • Start date Start date
  • Tags Tags
    Arduino Data
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 3K views
lcr2139
Messages
58
Reaction score
0
for some reason, my Arduino Uno does not detect data. I have it hooked up to an EasyDriver and a stepper motor. I would like the motor to turn and I am controlling it with the Arduino IDE.

void loop()
{

if (Serial.available() > 0)
{
Serial.print("data available");
int a = Serial.read();
Serial.print(a);
rotate(a, .1);
}
}
The motor is not rotating because the serial port is not available, but I do not know why. Can someone tell me the reasons why the serial port would not be available? How can I fix this problem?
 
Physics news on Phys.org
Can you duplicate the behavior of this example?

http://arduino.cc/en/Serial/Available

If so that eliminates some potential explanations. If not that eliminates some others.

I am assuming that web page is the correct place/version/etc/etc