New firmware release 1.4.0.b1



  • I'm also a bit stumped by how to turn off wifi.

    If try a simple script:

    from network import WLAN
    import time
    import pycom
    
    pycom.heartbeat(False)
    wlan = WLAN(mode=WLAN.STA)
    wlan.deinit()
    
    while True:
        pycom.rgbled( 0x00ff00)
        time.sleep(0.1)
        pycom.rgbled( 0)
        time.sleep(9.9)
    

    I see no decrease in current at all.

    If I remove the wlan.deinit() the new power saving mode kicks in and I do see it switching from about 60mA to 140mA (@3.3V). I can't see how to turn it off. Thanks!



  • I mean something like this (I've used the equal sign for the system prompt in order to avoid generating mark-up text formatting)

    = import gc
    = gc.mem_free()
    31856
    = from network import WLAN
    = from network import Bluetooth
    = gc.mem_free()
    31536
    = wlan=WLAN()
    = gc.mem_free()
    31376
    = bt=Bluetooth()
    BTDM CONTROLLER VERSION: 010101
    btip start
    copy .data from 4000d890 to 3ffae6e0, len 00001830
    set .bss 0x0 from 3ffb8000 to 3ffbff70, len 00007f70
    BTDM ROM VERSION 0101
    BD_ADDR: 24:0A:C4:00:BD:CA
    NVDS MAGIC FAILED
    RF Init OK with coex
    = gc.mem_free()
    31152
    = wlan.deinit()
    = gc.mem_free()
    30992
    = bt.deinit()
    = gc.mem_free()
    30832



  • Great! I´'ve just updated one of my LoPys adn it seems to be working fine.

    However, I have a suggestion: It would be much better if wireless interfaces (LoRa, WiFi, Bluetooth, and whatever you add in the future) were in a well known disabled state by default upon power up.

    It's a bit clumsy to be required to do this just in order to get stuff running:

    from network import WLAN
    from network import Bluetooth
    wlan = WLAN()
    wlan.deinit()
    bt = Bluetooth()
    bt.deinit()

    Moreover, if in the future you add another network interface (like the planned GyPy, it will be mandatory to add proper "deinit()" commands even if not planning to use the new interface, which will hurt upwards compatibility.

    What happens when deinit() is called, by the way? Does the call to the intialization methods consume memory that I presume won't be released when calling deinit()?



  • Hello,

    The release is live :-), feel free to download it now. Thanks!

    https://www.pycom.io/support/supportdownloads/#firmware

    Cheers,
    Daniel



  • Wow power savings AND great news for BLE too, can't wait to try this.

    What are the chances the RMT code can be expanded to support more than the one LED, i.e. WS2812 strips?


Log in to reply
 

Pycom on Twitter