• 0 Votes
    2 Posts
    1k Views
    A
    Any luck with new wipy users ?
  • WS2811 Usage

    Discussion python
    9
    0 Votes
    9 Posts
    2k Views
    M
    @livius I am using the separate ws2811 ic and i have tried your code and it appears not to work? The datasheets suggest different timings..can you suggest what i need to adjust? https://cdn-shop.adafruit.com/datasheets/WS2811.pdf
  • ISL29125 RGB Sensor python library

    MicroPython python rgb sensor sparkfun
    1
    0 Votes
    1 Posts
    761 Views
    No one has replied
  • Convert string to integer

    MicroPython python
    7
    0 Votes
    7 Posts
    2k Views
    K
    @robert-hh said in Convert string to integer: binascii.hexlify("\x12") On my gpy binascii.hexlify("\x12") gives b'12' Rob. How come I get bytes but you get a hex string?
  • Configuration class

    MicroPython python
    3
    0 Votes
    3 Posts
    936 Views
    robert-hhR
    @misterlisty Besides that setx() should store the value, the other way of doing that is with decorators: class Status(object): def __init__(self): self.__x = 2 @property def x(self): return self.__x @x.setter def x(self, val): self.__x=val a=Status() print(a.x) a.x=1001 print(a.x)
  • download boot.py and main.py by ftp

    Discussion ftp python
    12
    0 Votes
    12 Posts
    3k Views
    A
    download boot.py and main.py by ftp
  • Connecting to Eduroam

    MicroPython eduroam nano gateway python
    10
    0 Votes
    10 Posts
    3k Views
    D
    @thomand1000 Unfortunately I didn't get it entirely fixed, the best theory is that the Eduroam has a UDP timeout feature, I did find a work around that has been working consistently, it gives a maximum of about 30 seconds downtime every 31minutes. The few things I changed are in the nanogateway.py file for the gateway example: After 1900 seconds the message "Failed to pull downlink packets from server" would occur so I put a machin.reset() in: def _pull_data(self): token = uos.urandom(2) packet = bytes([PROTOCOL_VERSION]) + token + bytes([PULL_DATA]) + ubinascii.unhexlify(self.id) with self.udp_lock: try: self.sock.sendto(packet, self.server_ip) except Exception as ex: machine.reset() self._log('Failed to pull downlink packets from server: {}', ex) And every 4-5th restart it would just not connect so I did a simple timer reset in the wifi connection: def _connect_to_wifi(self): count = 0 self.wlan.connect(ssid='eduroam', auth=(WLAN.WPA2_ENT, 'Username', 'Password'), identity='Username', timeout = 30) while not self.wlan.isconnected(): utime.sleep(1) count = count + 1 print(count) if count >= 30: machine.reset() self._log('WiFi connected to: {}', self.ssid) Hopefully one day I'll be able to get the UDP timeout thing properly fixed, but they don't change things like this in a hurry for a student haha.
  • MicroPython Unable to access REPL

    Projects micropython python
    2
    0 Votes
    2 Posts
    1k Views
    robert-hhR
    @giranp Good morning. First of all: You're in the wrong forum. The port for ESP8266 is supported at forum.micropython.org. Besides that, what you did is right. The information missing is: a) which kind of board are you using? b) did you set the access rights for /dev/ttyUSB0, or better, are you as user in the dialout group? You shoud get an error message if not. c) When connected, try Ctrl-C or Ctrl-B or Ctrl-D, whether this changes the behviour.
  • mqtt message directed to switc-case issue

    Discussion python mqtt
    3
    0 Votes
    3 Posts
    863 Views
    M
    its working now, not sure why, maybe the file were out of sync
  • Sharing variable among files?

    Guides python
    7
    0 Votes
    7 Posts
    2k Views
    L
    @robert-hh i was too fast, you have right global is for same unit simple use qualified name e.g: a.py myvar = 7 b.py import a def changea(): a.myvar+= 2 print(a.myvar) def printa(): print(a.myvar) for test use import b b.changea() >>>9 b.print(a) >>>9
  • 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) ...
  • Raspberry with Maxbotics

    Discussion python raspberry pi maxbotics
    2
    0 Votes
    2 Posts
    1k Views
    B
    Hi @Jen, I think you might be in the wrong place! These forums are for the Pycom (https://pycom.io) products such as the WiPy, LoPy, etc. It seems as though you are using the Raspberry Pi which uses a different version of Python from that found on our devices! I'll point you towards https://www.raspberrypi.org/forums/ to find some more support for your issue! Thanks! Alex
  • LoRaWAN with LoPy and KPN + Loggly

    Projects kpn lopy loggly python
    2
    1
    1 Votes
    2 Posts
    2k Views
    RobTuDelftR
    Great Pierre, thank you. I've added the MySQL support, see the pull request.
  • 0 Votes
    21 Posts
    8k Views
    R
    @jmarcelino that fixed it. I can now upload my own firmware. Your fix of increasing the stack and putting listining mode in PASSIVE doesn't help though :-(. I'll see if I can go deeper into the scanning part. thanks for all the help Rolf