UPM

The UPM API is a high level sensor library for IoT devices using MRAA. See examples here. Back to index page.
SparkFun sensor images provided under CC BY-NC-SA-3.0.

Ublox6 Class

Module: ublox6

UPM support for the U-BLOX 6 GPS module. It is also compatible with the SIM28 GPS module.
ublox6.jpg

Methods

Ublox6

(
  • uart
)
Number

Ublox6 object constructor

Parameters:

  • uart Number

    Default UART to use (0 or 1)

Returns:

Number:

dataAvailable

() Boolean

Checks to see if there is data available for reading

Returns:

Boolean:

True if there is data available for reading

readData

(
  • buffer
  • len
)
Number

Reads any available data in a user-supplied buffer. Note: the call blocks until data is available to be read. Use dataAvailable() to determine whether there is data available beforehand, to avoid blocking.

Parameters:

  • buffer String

    Buffer to hold the data read

  • len Number

    Length of the buffer

Returns:

Number:

the Number of bytes read

writeData

(
  • buffer
  • len
)
Number

Writes the data in the buffer to the device

Parameters:

  • buffer String

    Buffer to hold the data read

  • len Number

    Length of the buffer

Returns:

Number:

Number of bytes written

setupTty

(
  • baud
)
Boolean

Sets up proper tty I/O modes and the baud rate. The default baud rate is 9,600 (B9600).

Parameters:

  • baud Speed_t

    Desired baud rate

Returns:

Boolean:

True if successful