I'm using a Max17043 to read the State of Charge of a LiPo (https://datasheets.maximintegrated.com/en/ds/MAX17043-MAX17044.pdf)
It uses I2C to get the state. Even wrote a library for it (https://github.com/andrethemac/max17043.py).
@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,
Thanks for the advise. It would be useful if it would bring me a bit further.
Updating the Fw to version 1.18.2.r6 did not help me much. I removed the deepsleep board and dowloaded and installed the pycoproc.py file. Now I get the (infamous) Exception: Board not detected: I2C bus error.... Searched the forum for a solution to no avail..
Working on it for 3 hours but still do not have a solution..
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.