GithubHelp home page GithubHelp logo

djaus2 / rpipicowgpsandbt Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 549 KB

A set of Arduino Sketches for execution on a RPI Pico W involving GPS Bluetooth and Azure IoT Hub

License: GNU General Public License v3.0

C++ 77.55% C 0.82% C# 21.63%
arduino bleutooth gps serial-communication

rpipicowgpsandbt's Introduction

RPI Pico W GPS Bluetooth and Azure IoT Hub

A set of Arduino Sketches for execution on a RPI Pico W building up to and including sending GPS location data over Bluetooth in BT Classic mode. Also send GPS data to an Azure IoT Hub.


Update/Correction

The calculation of Latitude and Longitude from NMEA data has been corrected ina a number of projects as per my blog post :GPS: NMEA 101.


Blog Post

RPI-Pico-Arduino-AzSDK: Bluetooth and GPS Update

Hardware

Bluetooth

The RPI PicoW comes with Bluetooth. The BSP used has been updated to include that.

Arduino GPS Receiver

Projects

1.USART1 Echo

  • Echo text from Serial terminal (uppercased) back to it after first passing it through USART1 in loopback mode.

2.Basic GPS

  • Read and echo NMEA sentences to Serial terminal

3.InteractiveGPS

  • Can send commands to device from Serial terminal:
    • s: Start
    • p: Stop
    • n: No filter on messages
    • n: Filter all (none displayed)
    • a: Display GPGGA - Global Positioning System Fix Data
    • l: Display GPGLL - Geographic Position, Latitude / Longitude
    • v: Display GPGSV - Satellites in view

4.LocationGPS

  • Filter all messages except GPGGA
  • Get latitude, longitude and height
  • Note that string processing of NMEA messages is explicit rather than using existing libraries.
  • Commands:
    • s: start
    • p: stop
    • n display none
    • d: Display GPGGA string
    • l: Display as location tupple
    • t: Display as json telemetry
  • Has been modified for Sketch 7.
    • Parsing of NMEA in "reusable" function.

5.BTSerialUppercase

  • Receive text over Bluetooth and echo it back after upper-casing it.
  • Is the Android IDE SerialBT BTSerialUppercase example
  • Added echo to IDE Terminal of the characters being passed, unadulterated.
  • Note: Bluetooth Classic, not BLE.
  • Found the Android phone app Serial Bluetooth Terminal was easier to pair than desktop.

6.BluetoothGPS

  • Send Location data over Bluetooth to paired host.
  • As per 4 but data and commands over Bluetooth (Merger of 4. and 5.)
  • Receives commands over BT as per BTSerialUppercase and interprets them as per LocationGPS.
    • That is, sends Location data back over BT when available as per LocationGPS (to SerialBT instead of Serial)
  • Note: Bluetooth Classic, not BLE.

7.Azure_IoT_Hub_GPS

  • Send GPS location data, generated as per LocationGPS, as Telemetry to an Azure IoT Hub.
    • Minus interactive commands.
  • Filter all messages except GPGGA Get latitude, longitude and height
  • From LocationGPS uses json location option.
    • That is, all creation of the telemetry string explicitly uses string processing rather than GPS and json classes.
  • Now works.
  1. read-d2c-messages
  • .NET Console app to monitor messages sent to IoT Hub by 7.
  • Uses .NET Core 3.1
  • See code for connection details.

Nb: Was found that in Azure IoT Explorer, needed to paste same connection string as the Custom Endpoint for the device. Built-in [Yes] option did not work.

  1. read-d2c-messages-Net6
  • As per 8. but uses .NET 6.0
  • See code for connection details.

Footnote

Working on a Blazor app to display the GPS coordinates sent by 8. on a map. See djaus2/GPSMapIoTHub

rpipicowgpsandbt's People

Contributors

djaus2 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.