Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Arduino does not receive data

  1. May 31, 2012 #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?
     
  2. jcsd
  3. May 31, 2012 #2
    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
     
  4. May 31, 2012 #3
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Arduino does not receive data
  1. Data Processing (Replies: 5)

  2. Data Distribution (Replies: 7)

  3. Arduino and Matlab (Replies: 1)

  4. Arduino Sketch Help (Replies: 0)

  5. LCD and an arduino (Replies: 4)

Loading...