• Such a newb...

    3
    -1 Votes
    3 Posts
    337 Views
    K
    @robert-hh maybe wrong forum. I couldn't figure out the Github system and found this forum instead. Thanks for the tip on the USB cable. Hope it's that simple. .
  • Python clumsy

    2
    0 Votes
    2 Posts
    30 Views
    J
    Hi, You can indeed achieve this without saving it as an intermediate file using io.BytesIO. Here's how you can do it: import uzlib # Assuming you have the uzlib library for MicroPython # Assuming 'hexstr' contains your compressed data # You may need to convert 'hexstr' to bytes if it's currently a string # Create a BytesIO object to work with in-memory data from io import BytesIO hexstr_bytes = bytes.fromhex(hexstr) # Convert 'hexstr' to bytes hexstr_io = BytesIO(hexstr_bytes) # Decompress the data decompressed_bytes = uzlib.decomp(hexstr_io, 31) # Now, you can write the decompressed data to 'main.py' in the flash with open('main.py', 'wb') as f: f.write(decompressed_bytes) In this code, you can use BytesIO to create an in-memory buffer and then decompress the data from hexstr directly into that buffer. After decompression, you can write the decompressed data to 'main.py' without the need for an intermediate 'gzip.py' file. Resource- https://pypi.org/project/Clumsy/ Thanks
  • 0 Votes
    1 Posts
    13 Views
    No one has replied
  • Connecting two esp32 devices via bluetooth using micropython

    1
    0 Votes
    1 Posts
    14 Views
    No one has replied
  • Have the real date and time.

    2
    0 Votes
    2 Posts
    22 Views
    A
    You will have to sync RTC with some NTP server first. See: https://docs.pycom.io/firmwareapi/pycom/machine/rtc/ and https://docs.pycom.io/tutorials/networkprotocols/ntp/ Of course, this means you will need to connect to the internet in some way.
  • 0 Votes
    1 Posts
    10 Views
    No one has replied
  • SPI slave device help

    spi
    5
    0 Votes
    5 Posts
    59 Views
    J
    @DualMatic since the chip using 16-bit words you should provide a 2-byte buffer for the data being read.
  • 0 Votes
    1 Posts
    20 Views
    No one has replied
  • Google spreadsheet with Micropython

    2
    0 Votes
    2 Posts
    31 Views
    J
    @Nahian-Mugdho By using the Sheets API maybe?
  • LoPy4 - I2C - FRAM Memory - MicroPython Library

    i2c fram
    27
    0 Votes
    27 Posts
    128 Views
    J
    @Eric-Tremblay Ah sorry I had missed that. No, the message is correct. The address is on 16 bits, so takes two bytes to send. What happens when you try a read?
  • simple mqtt and wss

    wss mqtt
    14
    0 Votes
    14 Posts
    177 Views
    M
    Hope you managed to solve your problem, OP. You can use TLS encryption to secure the connection on your MQTT broker. I recommend getting more info from here on how to secure your data. This guide was written by the team behind the MQTT broker Mosquitto and is, therefore, reliable and up to date. You can follow their step-by-step guide to configure a professional, secure and performant MQTT broker. I also have several devices in a network and use this encryption system to make sure no one hacks them. Securing data transfer between clients of a network is mandatory.
  • [WPA2-ENT] Problem connecting to WPA2 Enterprise using PEAP-MSCHAPV2

    17
    0 Votes
    17 Posts
    172 Views
    Y
    @hb-asf same here ... apparently it's still not solved
  • Sending data from device with (rs232 port ) to pico and send it to pc

    1
    0 Votes
    1 Posts
    13 Views
    No one has replied
  • Extract value from list..

    micropython
    2
    0 Votes
    2 Posts
    12 Views
    robert-hhR
    @misterlisty If the object is a named tuple, use obj.mac, if it is a simple tuple, use indices and split.
  • Connect to 2G only?

    3
    0 Votes
    3 Posts
    34 Views
    F
    Thanks, I was somehow under the impression that Gpy has a 2G fallback.
  • [SOLVED] UART and MH-Z16 CO2 sensor

    uart micropython mh-z16
    15
    0 Votes
    15 Posts
    924 Views
    robert-hhR
    @saman-naz This code is not made for a linux based RPI.
  • 0 Votes
    5 Posts
    37 Views
    S
    @jcaron It's perfect I found what I want thanks a lot ! So if people want to know, in RegionEU868.c the function RegionEU868NextChannel, call the function CountNbOfEnabledChannels which check all the channel that are enabled ( channel enabled, joined and available for transmission) which get you a list of available channel and then it select one randomly from this list. In LoRaMac.c in the function ScheduleTx, there is a while loop calling RegionEU868NextChannel till one channel is available
  • How to drive an LCD screen with micropython?

    lcd micorpython raspberry pi arduino
    12
    0 Votes
    12 Posts
    97 Views
    robert-hhR
    @jack-austin This is the wrong forum for Raspberry Pi Pico and MicroPython. Better go to https://forum.micropython.org/
  • LoRa on esp32 in MicroPython?

    1
    0 Votes
    1 Posts
    30 Views
    No one has replied
  • Overhead in sending messages over LTE-M

    5
    2 Votes
    5 Posts
    56 Views
    C
    @jcaron Thanks for testing this. It seems indeed the most likely conclusion, certainly if the handshaking itself is already over 5000 bytes.

Pycom on Twitter