Udoo neo Arduino

Discussion in 'Arduino IDE' started by Ayeed Shaikh, May 21, 2016.

  1. Ayeed Shaikh

    Ayeed Shaikh Member

    Joined:
    Mar 9, 2016
    Messages:
    52
    Likes Received:
    1
    Arduino: 1.6.5 (Linux), Board: "UDOO Neo (Cortex M4)"

    In file included from /usr/share/arduino/hardware/UDOO/solox/variants/udooneo/Arduino.h:26:0,
    from gps.ino:2:
    gps.ino: In function 'String checkGPS()':
    gps:48: error: converting to 'String' from initializer list would use explicit constructor 'String::String(int, unsigned char)'
    converting to 'String' from initializer list would use explicit constructor 'String::String(int, unsigned char)'

    This report would have more information with
    "Show verbose output during compilation"
    enabled in File > Preferences.
     
  2. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Edit: Did not see your last reply..
    Does it give you any data in serial monitor? Then at least you know that the GPS is working and it can communicate with the Neo.
    Then you can found out what is the command to send to the GPS to have it only send the speed to the Neo.
    Or strip the Adafruit_GPS library so it will work with the Neo.
     
  3. Ayeed Shaikh

    Ayeed Shaikh Member

    Joined:
    Mar 9, 2016
    Messages:
    52
    Likes Received:
    1
    The GPS is not communicating with udoo
     
  4. Ayeed Shaikh

    Ayeed Shaikh Member

    Joined:
    Mar 9, 2016
    Messages:
    52
    Likes Received:
    1
    facing this issue
    Arduino: 1.6.5 (Linux), Board: "UDOO Neo (Cortex M4)"

    In file included from /usr/share/arduino/hardware/UDOO/solox/variants/udooneo/Arduino.h:26:0,
    from gps.ino:2:
    gps.ino: In function 'String checkGPS()':
    gps:48: error: converting to 'String' from initializer list would use explicit constructor 'String::String(int, unsigned char)'
    converting to 'String' from initializer list would use explicit constructor 'String::String(int, unsigned char)'

    This report would have more information with
    "Show verbose output during compilation"
    enabled in File > Preferences.
     
  5. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Try this code. It is the same as I gave you earlier but I updated it a little and it compiles :) I am not a C programmer so it is not the best program.
    It will spit out Fix data ($GPGGA) so I think you have to have it on a place where it can see the satellites so it can fix. And this can take uptil 15 minutes the very first time!

    So after a fix (or perhaps right after you start the sketch) you will get strings in the IDE Serial Monitor like
    $GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47

    Where:

    Code:
    GGA                    Global Positioning System Fix Data
    
      123519                 Fix taken at 12:35:19 UTC
    
      4807.038,N         Latitude 48 deg 07.038' N
    
      01131.000,E       Longitude 11 deg 31.000' E
    
      1                          Fix quality: 0 = invalid
    
                                                    1 = GPS fix (SPS)
    
                                                    2 = DGPS fix
    
                                                   3 = PPS fix
    
                                                   4 = Real Time Kinematic
    
                                                   5 = Float RTK
    
                                                   6 = estimated (dead reckoning) (2.3 feature)
    
                                                   7 = Manual input mode
    
                                                   8 = Simulation mode
    
      08                         Number of satellites being tracked
    
      0.9                        Horizontal dilution of position
    
      545.4,M                Altitude, Meters, above mean sea level
    
      46.9,M                  Height of geoid (mean sea level) above WGS84 ellipsoid
    
      (empty field)         time in seconds since last DGPS update
    
      (empty field)         DGPS station ID number
    
      *47                        the checksum data, always begins with *
    See also http://www.gpsinformation.org/dale/nmea.htm

    For speed you have to parse the $GPRMC string (change $GPGGA in $GPRMC in the sketch to test it) where the speed is in.

    I suppose in the Adafruit_GPS library there are some function written to parse the data in readable format.
    You have the option to find another library that does not use SoftSerial or write the functions yourself.
    TinyGPS looks promising: http://arduiniana.org/libraries/tinygps/

    Code:
    void loop()
    {
      String s = checkGPS();
      if(s && s.substring(0, 6) == "$GPGGA")
      {
        Serial.println(s);
      }
    }
    
    // Check GPS and returns string if full line recorded, else false
    String checkGPS()
    {
      String stringGPS = "";
      if (Serial0.available())
      {
        char c = Serial0.read();
        if (c != '\n' && c != '\r')
        {
          stringGPS  += c;
        }
        else
        {
          if (stringGPS != "")
          {
            String tmp = stringGPS;
            stringGPS = "";
            return tmp;
          }
        }
      }
      return "";
    }
    
     
  6. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Have you got your GPS running now?
     
  7. Ayeed Shaikh

    Ayeed Shaikh Member

    Joined:
    Mar 9, 2016
    Messages:
    52
    Likes Received:
    1
    nope yet. trying the same
     
  8. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    Dear guys,
    we don't have a GPS module here, we're gonna buy it one to support it. What would you like us to buy? What is the most used, in your opinion?
     
  9. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    I think it does not mather what GPS, it is more in the libraries that are used with the GPS (or Bluetooth) modules. Most libraries and example sketches I have seen use SoftSerial which is not supported by the Neo so the libraries and sketches have to be rewritten in order to use Neo's Serial0. It depends on the programming skills of the users if they succeed. So perhaps an example how to modify sketches and libraries to use Neo's Serial0 with the use of GPS and Bluetooth modules would be handy.
    Other solution direction would be to support SoftSerial, but i I suppose that is a NoGo :)
     
  10. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    Hi @waltervl, we're going to add SoftSerial to the list of libraries to be supported.
     
    Ayeed Shaikh and waltervl like this.

Share This Page