UPDATE - DNS over NB-IOT is now working!
Please update to the latest 1.18.2 (stable):
or to the latest 1.20.0.rc7 (development):
Use the following to set your DNS Server to Google's DNS Servers ...
Then bring up your LTE Connection, and do:
>>> print(usocket.getaddrinfo("www.google.com", 80)[-1])
and you have to assume that you are in the same pressure area during the series of points. And you have to deal with wind speed and other stuff. It's only the cheapest additional method.
GPS shall be the best guessing method, if the device wakes up arbitrary without any information about the environment.
@robmarkcole sorry Rob, but it works for me as a platform. I do get annoyed by the lack of announcements for new releases and things being posted in the wrong places, but I don't think changing the platform will solve that.
As I see it, if Pycom only has limited resources to put into getting things done, then I'd vote to leave the platform as it is and focus on the documentation. If that was up to scratch then perhaps I wouldn't have to rely upon the forum so much.
@shaunix It would be charging if receiving power from USB, not running off the battery, obviously.
The simplest method is probably to use the on-board voltage divider and an appropriately configured ADC to measure the battery voltage. The charging voltage is higher than any voltage you may get while running off the battery.
To qoute the docs directly, " After reset, if P12 pin is held high (i.e. connect it to the 3V3 output pin), the heartbeat LED will begin flashing orange slowly. If after 3 seconds the pin is still held high..." suggesting that the pin should be pulled high AFTER reset.
In fact I did get a flashing orange led, using this method.
My problem was that it appeared to reset once I released P12. I released P12 because I did not want to go to the prvious OTA firware and only wanted to disable boot.py and main.py.
I am sure that I have P12 (and not GPIO12 or '12') as I get the flashing led..
I haven't solved it yet. Just documenting for posterity.
@arthurmed So what are the properties of the pulses to receive, and what kind of device is it that you want to connect?
Edit: I just tested that: Even if you specify then number of pulses, it will not return until a timeout happens (and the documentation is still wrong, because pulses_get() does not accept any arguments).
@jlcoleman @troy-salt There are quite a few screens around, usign all similar chip sets. Typically the have a separate SPI channel port for display and touch screen. @mcauser at the microypthon.org forum has a lot of different micropython drivers. Look at his repository https://github.com/mcauser.
Displays are available at plenty stores. I used e.g. to order from www.buydisplay.com, especially for larger (>4") displays.