@quentho If you have three format specifiers in ustruct.pack(), you have to supply three values. The questions is, how you want to pack that into a message? And what is the value range of each sensor? And why do you add these 0001, 0010, 0011, 0100 (1,2,3,4) pattern into the string?
@KiraKiraSoul That's not a LiPy battery, it is a NIHM battery pack. You can run the Lopy4 from it, but it will not be charged.
Better use a single 18650 LiPo cell (3000 mAh typcially) and use a step-up converter to get 5V for you fan (e.g. Pololu U1V11F5)
Edit: you may also find fans which run at 3.5 V and less. That may be easier.
the other day, you made a remark here that you are using Bluetooth and a standard BLE scanner app to update the WiFi credentials. We also believe this would be a perfect solution unless the Smart Config option might get unlocked through ESP-TOUCH at some point in the future.
As you told us that it even works really well and you might be able to share the code, we are humbly asking if you could give us some pointers regarding that.
The background of our question is that we are in the process of conceiving a convenient datalogger application  for the Hiveeyes project  which is well suitable to be used for other environmental purposes beyond monitoring bee hives. We will be happy when this might spark your interest.
With kind regards,
I mage a PR for inverted UART signals, based on the release candidate version. The ony changes file is mods/moduart.c, so it's easy to use it for the master branch too:
@PeterB said in how to check if a non-existing key in nvs ?:
@johand said in how to check if a non-existing key in nvs ?:
You have to check if it is None or not, change to:
if pycom.nvs_get("count") != None:
Are you sure that will work? An exception is an exception and "pycom.nvs_get("count")" would not return anything to compare with. The exception would be generated before the compare can be executed.
Depends on the version. This must have changed over time.
You can simply use a variable and wrap the call, so that it shall run on all versions:
_wake = pycom.nvs_get('wake');
except Exception as e:
_wake = None
_wake = 103
@johanbrichau thanks for your example project! I am having trouble getting this to work based on your project. are you able to share an example of you config.py file? How do you load the rsa file and generate it?
@Dezert754 you probably want to use different timers (the first argument to machine.PWM) and/or different channels (the first argument to pwm.channel). Probably the latter rather the former.
You can also probably avoid instantiating / configuring each time you need to do something.
s = "".join(["%02X" % b[i] for i in range(len(service) - 1,-1,-1)])
sm = s[:8] + "-" + s[8:12] + "-" + s[12:16]+"-"+ s[16:20] + "-" + s[20:]
Which is however on letter longer than the string above. So check whether in the second group it is really three 0's.
Edit: for the second step, you can also write:
sm = "-".join([s[:8], s[8:12], s[12:16], s[16:20], s[20:]])
@kgunnar said in Where can I find the source code for the network/LTE?:
Python layer available somewhere
The C file for the Python API file is this one: https://github.com/pycom/pycom-micropython-sigfox/blob/master/esp32/mods/modlte.c
It calls other functions of the LTE module. You'll find it if you follow the code.