Arduino serial port functions

Discussion in 'Arduino IDE' started by supertjhok, Nov 10, 2013.

  1. supertjhok

    supertjhok New Member

    Joined:
    Nov 2, 2013
    Messages:
    1
    Likes Received:
    0
    I'm running the current Arduino IDE (v1.5.4) on a UDOO Quad. Most programs work fine (thanks guys), but I've noticed one strange issue: the Arduino Serial.print(x) and Serial.println(x) functions cause program execution to freeze if x is a floating point number. Integers seem to be OK.

    Has anyone faced this issue before? The only reference to a similar problem that I found can be seen here: http://forum.arduino.cc/index.php?topic=174874.0.
     
  2. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    Sounds like it might be a armel/armhf issue possibly.

    Are you using the stock Linaro Ubunto 11.10 version 1.2 from this site, and then ran the update?
     
  3. delba

    delba Administrator Staff Member

    Joined:
    May 8, 2013
    Messages:
    1,064
    Likes Received:
    9
    Lifeboat_Jim probably got the point. To be sure we'll run some tests and let you know.
     
  4. dantavious

    dantavious New Member

    Joined:
    Nov 29, 2013
    Messages:
    32
    Likes Received:
    0
    Hi all,
    I can not even get any serial print functions to display anything. I am using:
    Linux udoo 3.0.35 #1 SMP PREEMPT Thu Nov 28 13:14:24 CET 2013 armv7l armv7l armv7l GNU/Linux

    What in the world to do. This problem makes the Arduino side kind of worthless. Any assistance would be appreciated.

    V/r

    dantavious
     
  5. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    I don't think that is enough information to go on. Feel free to post a code snippet and perhaps we can spot what the issue is.
     
  6. dantavious

    dantavious New Member

    Joined:
    Nov 29, 2013
    Messages:
    32
    Likes Received:
    0
    Hi,
    Thanks for the reply. I am actually using the code from the udoo website.
    http://www.udoo.org/ProjectsAndTutorial ... lioID=1394
    I am not able to get any serial output. What else could the problem be.

    #include <dht11.h>

    dht11 DHT11;

    #define DHT11PIN 13
    int led_hum = 12;
    int led_temp = 11;

    void setup() {
    // put your setup code here, to run once:
    delay(5000);
    Serial.begin(9600);
    Serial.println("UDOO & DHT11 - TEST PROGRAM By Alessandro Paghi");
    Serial.println("Humidity (%)\tTemperature (C)\tLed_Hum\t\tLed_Temp");
    pinMode(led_hum,OUTPUT);
    pinMode(led_temp,OUTPUT);

    }

    void loop() {
    // put your main code here, to run repeatedly:
    DHT11.read(DHT11PIN);
    Serial.print(DHT11.humidity);
    Serial.print("\t\t");
    Serial.print(DHT11.temperature);
    Serial.print("\t\t");
    if(DHT11.humidity>45)
    {
    digitalWrite(led_hum,HIGH);
    Serial.print("ON\t\t");
    }
    else
    {
    digitalWrite(led_hum,LOW);
    Serial.print("OFF\t\t");
    }
    if(DHT11.temperature>23)
    {
    digitalWrite(led_temp,HIGH);
    Serial.println("ON");
    }
    else
    {
    digitalWrite(led_temp,LOW);
    Serial.println("OFF");
    }
    delay(2000);
    }
     
  7. jdonavan

    jdonavan New Member

    Joined:
    Oct 28, 2013
    Messages:
    34
    Likes Received:
    0
    My post from yesterday has a very small example that replicates this issue...
     

Share This Page