GPS click on micropython
GPS click on micropython
I am trying to run the Mickroe GPS Click https://www.mikroe.com/gps-click on a board flashed with Zephyr port of MicroPython. There is however no ready made library available.There is only one available in C as seen from here:https://github.com/MikroElektronika/mik ... clicks/gps .Can someone please tell me how can I run the gps click on my board with this example via repl.
Thank you very much.
Thank you very much.
Re: GPS click on micropython
I am also facing this problem with other click boards running on various other protocols.Do I have to only copy and convert the code from c to python at a function level and take it into use?
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: GPS click on micropython
See this library. I haven't tested with the board you describe, but assuming it emits standard NMEA sentences it should work. There is also MicropyGPS on which which I based my solution.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: GPS click on micropython
Thank you very much.
I am using a zephyr port of MicroPython and not running it on a board that has a dedicated port of micropython on it. Hence I am facing issues with importing the uasyncio module .Whenever I type the statement import uasyncio as asyncio I get an error that no module named 'uasyncio' found.
I am using a zephyr port of MicroPython and not running it on a board that has a dedicated port of micropython on it. Hence I am facing issues with importing the uasyncio module .Whenever I type the statement import uasyncio as asyncio I get an error that no module named 'uasyncio' found.
Re: GPS click on micropython
I have also tried cloning the repo in my machine, pasting the required files in the micropython directory and then flashing it to the board but I encounter the same errors.Can you please guide me on this please.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: GPS click on micropython
I'm sorry but I have no experience of Zephyr. Is it possible to install uasyncio with upip? If your hardware is not networked you could try micropip.
If you really can't get uasyncio (which would be a shame) you could try MicropyGPS which uses synchronous code.
If you really can't get uasyncio (which would be a shame) you could try MicropyGPS which uses synchronous code.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: GPS click on micropython
For simply reading the NMEA data from the sensor, I believe just uart.write("$GPGGA") would be enough right?
Thank you!!
Thank you!!
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: GPS click on micropython
The GPS unit I use sends data regularly without needing any prompting. My library in normal use is listen-only. On a cold start it takes a few minutes before it starts sending because it waits to acquire sufficient satellites but then it sends once per second.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: GPS click on micropython
Thank you very much Peter for your help,
I had written a small driver code for reading the NMEA data from the GPS sensor(u-blox LEA-6S), however it does not print the required data giving a blank output.Can you please have a look at the code:https://github.com/Yadnik1/GPS-Click/bl ... 20CLICK.py and guide me where I am going wrong.
The output I get is like this:https://github.com/Yadnik1/GPS-Click/bl ... 0ERROR.png
Thank you very much!!
I had written a small driver code for reading the NMEA data from the GPS sensor(u-blox LEA-6S), however it does not print the required data giving a blank output.Can you please have a look at the code:https://github.com/Yadnik1/GPS-Click/bl ... 20CLICK.py and guide me where I am going wrong.
The output I get is like this:https://github.com/Yadnik1/GPS-Click/bl ... 0ERROR.png
Thank you very much!!
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: GPS click on micropython
It seems as if the UART is not responding. I think you need help from someone who's used a UART under Zephyr. Is
the correct way to initialise a UART under Zephyr? On the ports I've used (Pyboard, Pi Pico, ESP32) UART ID's are numeric.
Code: Select all
gps_module = UART("UART_0")
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.