- #1
lcr2139
- 62
- 1
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?
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?