• Tarballs

    tarballs micropython python code porting
    1
    0 Votes
    1 Posts
    285 Views
    No one has replied
  • Cellular hardware for wireless temperature sensors

    wipy lopy lorawan lopy wireless
    2
    0 Votes
    2 Posts
    320 Views
    D
    @noboz32 I sent you a PM
  • L76 GPS High altitude balloon mode

    l76lgnss pytrack balloon
    3
    0 Votes
    3 Posts
    563 Views
    K
    Thank you for the information provided, this is very helpful to me.
  • Can't install the firmware upgrader on W10

    upgrade firmw window10
    4
    0 Votes
    4 Posts
    588 Views
    S
    @ropito Bon jour ropito... I'm stuck between the antivirus and the w10 with the same error as you was but I can understand what do you clean in the register... Any advice wellcome! Rom
  • How to use deep sleep in a loop

    deep sleep lopy4 pytrack
    11
    0 Votes
    11 Posts
    1k Views
    D
    @rcolistete I did. And here is the result : https://forum.pycom.io/topic/4153/sipy-pytrack-deepsleep-and-power-consumption-problem Can you help me?
  • nb-iot on t-mobile in NL

    fipy nb-iot connect issues connection connect
    12
    0 Votes
    12 Posts
    1k Views
    robert-hhR
    @eric-waai These settings should be fine then.
  • power supply

    power supply
    3
    0 Votes
    3 Posts
    470 Views
    No one has replied
  • 0 Votes
    4 Posts
    2k Views
    T
    @paul-thornton said in LoRa (Raw) & MQTT vs. LoRaWAN & private LoRaWAN server: Is this something that has to be completely self hosted? From the current state of things, yes, it has to. I need a solution that can scale up. We think about several hundrets of nodes with several gateways per application. Everything has to be self powered. And also for now, it's not clear if the gateways will have a permanent connection to the higher-level network, or will initially store all the information and load them up in fixed intervals. My first attempt was, to use TTN. But there are opinions that speak against it. Think of areas in the world where the Internet is not as free as it should be. Cheers, Thomas
  • 0 Votes
    1 Posts
    294 Views
    No one has replied
  • Pinout documentation for development modules

    expansionboard devmodules fipy rts cts
    3
    0 Votes
    3 Posts
    548 Views
    R
    @Paul-Thornton What is the answer to his question though? I too am very confused by the documentation for the Fipy and expansion boards. There is conflicting or outdated information regarding the expansion board v2.0 and v3.0. Often I don't know which is being referred to, and worse, Pycom's channel resellers like Mouser, Digikey, etc. often mix them up.
  • GY-87 micropython library

    micropython gy-80 lopy4
    32
    0 Votes
    32 Posts
    5k Views
    robert-hhR
    @tttadam Updated code. The name of the methods are changed to reflect PEP8. SO readRaw() -> read_raw and a new read_scaled(), which returns the values as Gauss and °C. The constructor has an optional second argument for the temperature offset in °C . # # initial code by Sebastian Folz, M.Sc. at # http://nobytes.blogspot.com/2018/03/qmc5883-magnetic-field-sensor.html # which, I assume, was itself ported from C-Code # See also https://github.com/RigacciOrg/py-qmc5883l # # Changes and Additions: # - port to micropython's I2C methods # - add method read() for scaled values # - reading register values into a static buffer # - parsed register values in one single struct call # - changed method names according to PEP8 # - apply PyLint and fixed bugs & warnings reported by it # import time import struct from machine import idle class QMC5883: #Default I2C address ADDR = 0x0D #QMC5883 Register numbers X_LSB = 0 X_MSB = 1 Y_LSB = 2 Y_MSB = 3 Z_LSB = 4 Z_MSB = 5 STATUS = 6 T_LSB = 7 T_MSB = 8 CONFIG = 9 CONFIG2 = 10 RESET = 11 STATUS2 = 12 CHIP_ID = 13 #Bit values for the STATUS register STATUS_DRDY = 1 STATUS_OVL = 2 STATUS_DOR = 4 #Oversampling values for the CONFIG register CONFIG_OS512 = 0b00000000 CONFIG_OS256 = 0b01000000 CONFIG_OS128 = 0b10000000 CONFIG_OS64 = 0b11000000 #Range values for the CONFIG register CONFIG_2GAUSS = 0b00000000 CONFIG_8GAUSS = 0b00010000 #Rate values for the CONFIG register CONFIG_10HZ = 0b00000000 CONFIG_50HZ = 0b00000100 CONFIG_100HZ = 0b00001000 CONFIG_200HZ = 0b00001100 #Mode values for the CONFIG register CONFIG_STANDBY = 0b00000000 CONFIG_CONT = 0b00000001 # Mode values for the CONFIG2 register CONFIG2_INT_DISABLE = 0b00000001 CONFIG2_ROL_PTR = 0b01000000 CONFIG2_SOFT_RST = 0b10000000 def __init__(self, i2c, offset=50.0): self.i2c = i2c self.temp_offset = offset self.oversampling = QMC5883.CONFIG_OS64 self.range = QMC5883.CONFIG_2GAUSS self.rate = QMC5883.CONFIG_100HZ self.mode = QMC5883.CONFIG_CONT self.register = bytearray(9) self.reset() def reset(self): self.i2c.writeto_mem(QMC5883.ADDR, QMC5883.RESET, 0x01) time.sleep(0.1) self.reconfig() def reconfig(self): # print("{0:b}".format(self.oversampling | self.range | self.rate | self.mode)) self.i2c.writeto_mem(QMC5883.ADDR, QMC5883.CONFIG, self.oversampling | self.range | self.rate | self.mode) time.sleep(0.01) self.i2c.writeto_mem(QMC5883.ADDR, QMC5883.CONFIG2, QMC5883.CONFIG2_INT_DISABLE) time.sleep(0.01) def set_oversampling(self, x): self.oversampling = x self.reconfig() def set_range(self, x): self.range = x self.reconfig() def set_sampling_rate(self, x): self.rate = x self.reconfig() def ready(self): status = self.i2c.readfrom_mem(QMC5883.ADDR, QMC5883.STATUS, 1)[0] # prevent hanging up here. # Happens when reading less bytes then then all 3 axis and will end up in a loop. # So, return any data but avoid the loop. if status == QMC5883.STATUS_DOR: print("Incomplete read") return QMC5883.STATUS_DRDY return status & QMC5883.STATUS_DRDY def read_raw(self): try: while not self.ready(): idle() self.i2c.readfrom_mem_into(QMC5883.ADDR, QMC5883.X_LSB, self.register) except OSError as e: print ("OSError", e) pass # just silently re-use the old values # Convert the axis values to signed Short before returning x, y, z, _, t = struct.unpack('<hhhBh', self.register) return (x, y, z, t) def read_scaled(self): x, y, z, t = self.read_raw() scale = 12000 if self.range == QMC5883.CONFIG_2GAUSS else 3000 return (x / scale, y / scale , z / scale, (t / 100 + self.temp_offset))
  • Float to bytearray conversion for sigfox payload

    sigfox micropython typeerror
    23
    0 Votes
    23 Posts
    4k Views
    robert-hhR
    @jcaron I think that this was @tttadam's conclusion.
  • New solid state 3V low power CO2 sensor

    co2 sensor i2c sensor
    2
    0 Votes
    2 Posts
    311 Views
    D
    I asked them back in October. They asked 99USD/piece for 100pcs order quantity. Unless it goes to half that price I believe it is not suitable for mass market IoT products. Maybe if you would approach SenseAir directly the price would be better. Anyway if you are going to test it I would be very interested in the results. We are currently using Sensirion SCD30 which has high power consumption (basically you have to perform more than 10 consequent measurements) but the results are pretty good and so is the price.
  • Advice on script organization

    main boot.py scripts
    2
    0 Votes
    2 Posts
    425 Views
    robert-hhR
    @alexpul What I do a) I do not change boot.py a lot. I have only command related to the general operating mode in there, like USB REPL enabled or WiFi access, although the latter may vary b) I do not code for specific things in main.py. Instead if put that into files with appropriate names and import them in main.py. If one application consists of several files, I put them in a subdirectory and either uos.chdir() into that, or alin sys.path to include that subdirectory, such that import can find the files.
  • Invalid json returned by urequests get

    urequests http get json
    7
    0 Votes
    7 Posts
    2k Views
    K
    @paul-thornton I got that sorted by modifying line 53 in urequests as per a suggestion I found online somewhere Paul. I could really use some help withhttps://forum.pycom.io/topic/4014/gpy-in-deep-sleep though.
  • struct on WiPy gives different output than on PC

    wipy struct
    4
    0 Votes
    4 Posts
    532 Views
    robert-hhR
    @alexpul Indeed, but both pack to the same bytes object. PC: >>> struct.pack("f", 3.4) b'\x9a\x99Y@' >>> struct.unpack("f", b'\x9a\x99Y@') (3.4000000953674316,) >>> Pycom: >>> struct.pack("f", 3.4) b'\x9a\x99Y@'
  • 0 Votes
    1 Posts
    323 Views
    No one has replied
  • Pyscan NFC Reader Encrypted Message

    pyscan nfc
    1
    0 Votes
    1 Posts
    309 Views
    No one has replied
  • Simple mobil app using BLE

    wipy
    3
    0 Votes
    3 Posts
    483 Views
    J
    There was a platform that first got me looking at pycom products, and that was pymate. https://forum.pycom.io/topic/14/pymate-is-here Unfortunately it seems they have moved on and no longer support it. So mobile dev is part of the discussion. Or at least was. I am still hoping they bring it back, as it was exactly what I needed when I decided to "Go pycom". It seems like the dev team has a lot of good ideas, but jump around between them so much that a lot is never finished before they change course (such as Pylife now being the new path of all effort) and move on. That makes it difficult to really plan a future around a platform that has great promise but divided focus and sometimes short attention span. And I know that sounds insulting... but I can't figure out another way to explain it. So many other products were offered as "coming soon" or "out of stock, but pre order here" that now seem to be forgotten (sensors, cases, etc) that I am not sure what to build around.
  • 0 Votes
    7 Posts
    1k Views
    P
    Nevermind. It works now. The correct function is: lora.nvram_save() and lora.nvram_restore()

Pycom on Twitter