• Letting two WiPy talk to each other

    wifi socket communication
    10
    0 Votes
    10 Posts
    2k Views
    C
    Hello @binux I know this is a slightly old thread, but i wondered if you could perhaps share your code please? I am trying to do something similar - I would like to run two pytracks accelerometer at or as near the same time so I can record vibrations at two positions and unless trying to reset both at the same time I am unsure how to do so, I thought your code may help! Thanks
  • wlan.connect() wlan.isconnected() fails if run from inside a _thread

    1
    0 Votes
    1 Posts
    30 Views
    No one has replied
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    25 Views
    No one has replied
  • Looking for advice - Wipy & Expansion Board power saving.

    4
    0 Votes
    4 Posts
    71 Views
    R
    @jgomez Deepsleep is the best option for powersaving since you can get down to a uA level of consumption. When i use lightsleep on my FiPy + Pysense, and remember to disable all network capabilities and sensors on the board, i get a consumption of about 6.8 mA. Lightsleep does however not "reset" the FiPy, it remembers where it went to sleep, and starts from there. So lightsleep is great, if you want to be able to save power, but you still need the capability to wake-up fast without re-booting. So if a project requires that your WiPy must be sleeping, unless it gets an interrupt, and then must be able to quickly wake up to, lets say, start sampling from a sensor immediately, then lightsleep is the way to go. Then if you know that there are longer periods with inactivity, you could always time it so thats when it goes into deepsleep mode.
  • WLAN.STA_AP and wlan.isconnected()

    3
    0 Votes
    3 Posts
    207 Views
    No one has replied
  • pymakr.anything command not found in VS Code

    2
    1 Votes
    2 Posts
    48 Views
    D
    Possibly check if node.js is installed?
  • import urequest

    3
    0 Votes
    3 Posts
    190 Views
    X
    I had the same problem, and it was because the "urequest" module is not inside the LoPy, you've to upload it yourself with your project. https://github.com/micropython/micropython-lib/blob/master/urequests/urequests.py Here you can find an "official" one to use!
  • Cannot get WiPy 3 to work as station (WLAN.STA)

    wipy 3.0 wlan sta mode
    4
    0 Votes
    4 Posts
    64 Views
    D
    @robert-hh Thanks I agree busy-waiting is bad, my understanding was that machine.idle() would give other threads/interrupts the opportunity to run. That code was added to aid the debugging, to see activity while waiting for the network layer to configure itself. I've substituted your code but unfortunately it hasn't changed the networking behaviour - still no IP layer connectivity.
  • modbus library not working on 1.19 and up firmware

    2
    0 Votes
    2 Posts
    147 Views
    L
    I made it work in version 1.20.2.rc7 (dated 2020-05-04) by going into serial.py file and replacing readall function call by read. Anyhow, isn't a better library? A port of minimalmodbus will be great as I hard to hardcode some things to be able to read inverse float values. I've filled this issue at github's repo, but last commit is 12 months ago... Issue content: Hi, I'm reading values from a sensor that uses RS485 and sends inverse float values with function code 4 (addresses 0, 2 and 4) and it was imposible for me to read those values using the read_input_registers function (which uses function code 4). I had to add another function for converting values to float instead of short (quite hardcoded for my case, not so much into modbus): def _to_float(self, byte_array, signed=True): # response_quantity = int(len(byte_array) / 2) # this always returned 2 # fmt = '>' + ('f' * response_quantity) # so fmt ended up like '>ff' and caused a buffer issue, so I hardcoded it to ' >f' # also, no idea about signed floats, just left the signed var to be consistent return struct.unpack('>f', byte_array) and a new function copy&pasted from read_input_registers, but using the _to_float` function defined above: def read_float_registers(self, slave_addr, starting_address, register_quantity, signed=True): modbus_pdu = functions.read_input_registers(starting_address, register_quantity) resp_data = self._send_receive(modbus_pdu, slave_addr, True) register_value = self._to_float(resp_data, signed) return register_value Any cleaner/correct/good way to implement this?
  • SD card pins

    1
    1
    0 Votes
    1 Posts
    46 Views
    No one has replied
  • Core dump - WLAN init

    1
    0 Votes
    1 Posts
    28 Views
    No one has replied
  • SSL Socket Server Side on WiPy 2.0

    wipy 2.0 ssl socket server
    3
    2
    1 Votes
    3 Posts
    1k Views
    C
    @Innocenzo did you solve the problem?
  • WiPy 3.0 ADC poor calibration - offset at 0V

    3
    0 Votes
    3 Posts
    59 Views
    J
    Thanks robert, Thats annoying. I will try and create a correction function which I can map my ADC value list to (to correct for non-linearity & offset). Love that ADS1115 though, with the programmable gain amp!
  • Date Time convert to Microsoft Access

    time lopy wipy
    5
    0 Votes
    5 Posts
    56 Views
    W
    @railmonitor thank you
  • create dbf files with Micropython?

    wipy lopy
    1
    0 Votes
    1 Posts
    21 Views
    No one has replied
  • Pyscan - camera

    1
    1 Votes
    1 Posts
    50 Views
    No one has replied
  • WLAN + MQTT reconnect example

    1
    0 Votes
    1 Posts
    72 Views
    No one has replied
  • Can I mount WiPy+Pysense in the MacOS Finder to upload files?

    4
    0 Votes
    4 Posts
    46 Views
    robert-hhR
    @jcaron said in Can I mount WiPy+Pysense in the MacOS Finder to upload files?: @robert-hh FTP wouldn’t work over USB though, only over IP (WiFi), of course. Of course ftp requires a WiFi connection. That's my regular use for file exchange with the devices, avoiding the regular pymakr trouble following Atom/VCS updates. But ftp and littlefs do not match. With ftp and littlefs there are regular crashes. The change to lfs_util.h suggested by @andreas in PR418 fixes these, and eventually Pycom will implement them, at least to that file.
  • WiPy fails to flash

    1
    0 Votes
    1 Posts
    88 Views
    No one has replied
  • time change for Germany

    wipy lopy time
    8
    0 Votes
    8 Posts
    243 Views
    J
    @Wolli01 Don't have a Pycom module at hand to test, but does that actually return local time by default? If so, I wonder where it could possibly get the timezone from... But a quick glance through the code makes me think it doesn't, does it? You can control the timezone used by localtime (and mktime) using utime.timezone, but it's simplistic (just an offset from UTC), it does not handle automatic DST changes. If you want that to be handled for you (which seems overkill on such a device IMHO) you'll probably have to use an external library that supports it.

Pycom on Twitter