Can anyone can give me a good start on putting the Pytrack/Gpy combo in deepsleep and waking up from a gpio and returning to sleep?
I want to use it as a flow detector where a simple float (switch) can be use as waking the module up and sending some ON/OFF status and return to sleep. I already have code to send messages on gpio triggering:
from network import LTE
from machine import Pin
from umqtt import MQTTClient
is_pressed = False
button = Pin("P10", mode=Pin.IN, pull=Pin.PULL_UP)
lte = LTE()
# Modem does not connect successfully without first being reset.
print("Resetting LTE modem ... ", end='')
print("Configuring LTE ", end='')
lte.send_at_cmd('AT!="RRC::addscanfreq band=2, 4, 5 dl-earfcn=9410"')
if not lte.isattached():
print("Attaching to LTE network ", end='')
# Once attached, connect() should succeed.
if not lte.isconnected():
print("Connecting on LTE network ", end='')
while not lte.isconnected():
print("Connected to LTE\n")
#wlan = WLAN(mode=WLAN.STA)
#wlan.connect("yourwifi", auth=(WLAN.WPA2, "yourpass"), timeout=5000)
#while not wlan.isconnected():
#print("Connected to Wifi\n")
client = MQTTClient("joe", "yourMQTTbroker", port=1883)
client.settimeout = settimeout
if button() == 1 and not is_pressed:
elif button() == 0 and not is_pressed:
is_pressed = True
elif button() == 1 and is_pressed:
is_pressed = False
hi everyone, sorry for the delayed answer.
We're taking steps towards open-sourcing main part of Pymesh (maybe keeping the Pybytes connection as close-source).
The pdf license was a temporary solution, to allow us to make this split, and offer you, our community, to freely build your Pymesh solutions.
I just tried the same process on my side. It worked fine.
I've opened the Pycom firmware updater and pasted the activation token.
Then firmware updater wrote the Pybytes device config to a device and updated the firmware.
Then the device restarted and was connected to Pybytes. The last connection time was updated.
I tried pymakr and I can evaluate expression in REPL
rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
mode:DIO, clock div:1
Initialized watchdog for WiFi and LTE connection with timeout 1260000 ms
WiFi connection established
Pybytes connected successfully (using the built-in pybytes library)
Pybytes configuration read from /flash/pybytes_config.json
Pycom MicroPython 1.20.1.r2 [v1.11-06dfad0] on 2019-11-30; FiPy with ESP32
Pybytes Version: 1.3.0
Type "help()" for more information.
It's strange that it is not working for you.
Can you to change the Wifi network in your device profile and then try to provision it again?
Also, enable debugging, maybe you spot something there
import pycom; pycom.nvs_set('pybytes_debug', 6)
You can also try to completely erase a device with erase_all command
Beware that after doing erase_all device will not boot up properly until you the flash firmware (doing the firmware update with firmware updater)
For a client, I'm looking for a senior Micropython/embedded developer (freelance/contractor) that preferrably has experience with Pycom modules. I have been working as developer for the client myself, but they need extra help.
You will be working on the software for a new iteration of the (Pycom-based) device that the company is developing. You will be working most of the time on the Micropython code that runs on the devices. You will also need to be comfortable with embedded C in order to analyze and fix problems in the Pycom firmware when they arise and extend the firmware in case a feature cannot be implemented in Micropython.
You can work remotely, but occassional visits to the company headquarters in Noord-Brabant are desired.
Developer Experience Profile
Embedded C + GNU command line toolchain (gcc, gdb, binutils)
Inter-IC Protocol knowledge: I2C, SPI, 1Wire, etc.
Analyzing/Debugging hardware issues using a logic analyzer
Development of device drivers and other low-level code (both in Micropython as well as C)
Unit testing (esp. Python) is a plus
TypeScript & React experience is a big plus, but not a must
Bluetooth experience is a plus, but not a must
The company is active in the smart building and real-estate space. It has many Pycom-based products deployed in a number of large buildings in The Netherlands. The team working on the products and services is very small so you will have a lot of influence on the product. The company is based in Noord-Brabant, The Netherlands, easily accesible by car or public transit.
Please contact me at:
post AT martijnthe DOT nl