• MQTT Client / subscriber

    Moved mqtt lopy
    6
    0 Votes
    6 Posts
    3k Views
    M
    Was this issue resolved? Having same issue, same code!
  • 0 Votes
    6 Posts
    3k Views
    D
    @alg cool, glad to hear that your problem is solved :-)
  • how to change some bits in an byte result

    micropython i2c
    6
    0 Votes
    6 Posts
    2k Views
    L
    @jiemde bytes is immutable you must first convert it to mutable type like bytearray e.g. a=bytes([1,2,3]) #create bytes in your case steep not needed you have it already as result from readfrom_mem b=bytearray(a) #convert it to bytearray b[1]=11 #change value to what you need a=bytes(b) #change it back to bytes if you need to
  • MQTT with 2 subscribes

    mqtt
    16
    0 Votes
    16 Posts
    4k Views
    L
    @luc-hanneuse first you can try to test if it is None if v==None: and also you can test for type by: type(v)
  • I2C support clock stretching ?

    micropython pycom lopy sipy wipy i2c
    5
    0 Votes
    5 Posts
    1k Views
    J
    Hi @livius, yes mailbox! here is the text in the documentation of the CCS811 chip: Programming Model: For flexibility and software driver maintenance simplification the CCS811 does not support direct addressing of registers over the I2C bus. Instead it supports single byte mailboxes identifiers that behave as proxies for registers with specific functionality and data sizes. To access a register an I2C transaction must be issued with the target address on the CCS811 being equal to the intended mailbox, this by way of proxy opens access to the register's functionality. In this manner the programming model is rigidy fixed while allowing the underlying firmware to be inherently flexible, extensible and configurable. That's chinese for me! Jiemde
  • How to interrupt executing main.py from lopy

    lopy communication interrupt main.py
    2
    0 Votes
    2 Posts
    2k Views
    robert-hhR
    @monersss If you get access to the REPL, you can simply hit Ctrl-C. Otherwise you can use safeboot: Connect G28 with the 3v3 pni, and then push reset. When the LED turns orange, then disconnect the wire. The device will then not execute boot.py and main.py. The documentation talks about falling back to a series of previous versions, but that is nonsense on a Lopy
  • 0 Votes
    13 Posts
    6k Views
    robert-hhR
    @monersss Then, start your script with: from network import LoRa import socket import time import os os.dupterm(None) ...
  • How to run a code in lopy stored on SD card?

    lopy sd card micorpython
    3
    0 Votes
    3 Posts
    1k Views
    M
    @robert-hh great thank you it worked perfectly!
  • Which way on the board?

    Moved
    9
    0 Votes
    9 Posts
    2k Views
    B
    I initially put my board in backwards, then fixed it. But I am not getting any LED action on the LoPy. What should I do?
  • How can I setup an emulation environment on my PC?

    unix
    2
    0 Votes
    2 Posts
    1k Views
    robert-hhR
    @betterauto I guess the answer is NO. The Linux versions are different. You can use them for the basic language and standard file operations, but as soon as you need specific modules, they behave different. The HW specific modules are not supported at all. And if that's not enough trouble, you have the subtle differences between the micropython.org branch and the pycom.io branch. In the example you mentioned, the Linux uos module implements just a few methods. More can be found in the os module, once you install the micropython/micropython-lib. That tries to add many of the Python standard modules, but is sometimes a little bit sparse.
  • Can someone pls. confirm, that MQTT is running w\ latest FW

    mqtt
    6
    0 Votes
    6 Posts
    2k Views
    T
    Arghh. Got it. It was a typo in the config file of my broker. The broker was running on the wrong port. Thanks. Thomas
  • Reading data through Uart

    sipy uart micropython
    3
    1
    0 Votes
    3 Posts
    1k Views
    C
    Good pickup, I will try and use P10 and P11 unless you recommend anything else? Edit, it works now thanks for the help
  • Re-using buffer with i2c...uctypes.bytearray_at()?

    i2c uctypes
    3
    0 Votes
    3 Posts
    1k Views
    M
    That's what I was looking for. With just a few changes my memory situation is quite a bit better. Thanks.
  • 0 Votes
    18 Posts
    5k Views
    lollisoftL
    @jmarcelino Was the battery type (Li-Ion) anywhere documented regarding the charger chip? That all should be by the vendor. I would probably combine the expansion board electronics with the LiPo Rider Pro. But I don't like to put too much unnesecary chips onto the board. I am not yet aware of charger and protection circuits (as discussed in my other thread https://forum.pycom.io/topic/1671/expansion-board-lipo-save-power-down-function-so-save-lipo-undervoltage) Assembling these two boards and connecting them with another USB cable is ok for prototyping, but nit ok for a end product - so to say :-) What about a KiCad project on github? Collecting circuits for various aspects? And documenting application notes for combining them into new ones? Btw, I have ordered three ADS1115 4 channel 16 Bit converters to monitor these voltages. It get's an interesting project... What is not yet clear to me is the fact that batteries probably have their own undervolt protection, that could nock out the remaining circuit so that it stops recharging in an undervolt situation, if not properly designed. So for my experiment, could I put the Seeed Studio Lipo Rider Pro battery connector in parallel to the expansion board battery connector and put there then the battery? If that is possible, I could keep switched off the step up converter for the USB port on the Lipo Rider and save me a USB cable :-)
  • Wifi RSSI and mqtt subscribe

    micropython mqtt wifi rssi rgb
    3
    0 Votes
    3 Posts
    2k Views
    S
    @this.wiederkehr Thanks, I will try that later tonight.
  • 0 Votes
    6 Posts
    2k Views
    S
    @ledbelly2142 Not yet, I did read somewhere here that the battery voltage is connected to ADC pin 16 so it should be possible. Hoping for an example that can report it as a Battery percentage. I'd like to have the following Topic structure on my LoPy's MQTT topic: lopy/ip lopy/probes/1 ... lopy/probes/4 lopy/battery lopy/rgb lopy/oled/1 ... lopy/oled/4 lopy/ble Cant think of any more yet. Still not sure how i'll go with my plan of 4x SPI Type K temp probes and 4x 128x32 OLEDs as they are SPI as well and require more than just a CS per screen. Reporting on the Battery topic would be things like percentage when it hits internal warning levels.. but with the view to using deep sleep it would probably report on wake up. Also a notification when its charging if at all possible would be nice. I changed the IP topic and paylod to this btw client.publish(topic="lopy/ip", msg=wifiaddress) And on the far end I use Node-red to append to the front: "LoPy Booted with IP: " + msg.payload; *node red function code - not micropython And send the string to Pushover for a push notification on my phone. I've also mapped the on board button to do a machine.reset() so I can carry it around, hit reset then get a notification on my phone if it connects to WiFi (good for range testing).
  • int.from_bytes bug?

    buit-in library
    4
    0 Votes
    4 Posts
    1k Views
    robert-hhR
    @bmarkus I tested that too on MP ESP8266 and ESP32. Therefopre I searched back about the issue and it's fix in the MP.org repository.
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • Wifi and Bluetooth disable

    wifi bluetooth
    2
    0 Votes
    2 Posts
    1k Views
    J
    @chrisi yes, you can use the USB port (as a serial port) and have access to the REPL or to update files using Atom/Pymkr for instance. An alternative would be to include code which enables Wi-Fi on some specific event, such as a press of the button on the expansion board or Pysense.
  • Can't get unittest to run

    unittest
    2
    0 Votes
    2 Posts
    996 Views
    No one has replied

Pycom on Twitter