• LOPY SPI Mikroe click module

    LoPy lopy spi sensor
    4
    0 Votes
    4 Posts
    520 Views
    robert-hhR
    @johncaipa said in LOPY SPI Mikroe click module: adc = (((buf[0] << 8) | buf[1]) & 0xfff) >>1 That one is wrong. You have to shift the raw value befor masking. The lowest bit of the returned value will not be at bit0 of adc, so you have to shift to to the right. Reason: The adc starts shifting out values at the 2nd (or third?) clock cycle, and SPI will create 16 clock cycles. So there are like 14 bits in the result buffer, of which only the high order 12 bits are valid. The others have to be discarded and the value has to be properly aligned. If you use a separate CS pin, you can simply use spi.read_into(). spi.read_into(buf) adc = ((buf[0] << 8) | buf[1]) >> x) & 0xfff x should be a value between 1 and 3. Best is to determine it experimentally. The conv variable and write_readinto() is only used to create the CS signal at the MOSI pin. By using an appropriate pattern for conv, like 0x8000, 0xc000, of 0xe000, you can shift the CS signal in clock steps, making the final shift of the result obsolete. So doing that save a pin and saves a few instructions.
  • 0 Votes
    2 Posts
    502 Views
    P
    Heya, Take a look at our own pybytes: http://pybytes.pycom.io/
  • Communication Cable for custom L01 Circuit

    LoPy lopy
    5
    0 Votes
    5 Posts
    467 Views
    O
    @robert-hh Thanks Robert 👍🏼
  • Send Text File from Webserver to Lopy?

    LoPy lopy fipy wipy http https
    2
    0 Votes
    2 Posts
    374 Views
    C
    @wolli01 Depends on a lot of circumstances. Use WiFi and simply upload the file using FTP. LoRa will need more code and tiny files.
  • 0 Votes
    2 Posts
    340 Views
    D
    @noboz32 I sent you a PM
  • 0 Votes
    4 Posts
    703 Views
    P
    Does this always fail on the same 3rd file? How large is that file? I presume its a normal .py file and not some multi MB binary or something equally strange?
  • 0 Votes
    14 Posts
    2k Views
    A
    Dear @martijnthe, we have been able to successfully get the boot time of our Terkin-Datalogger [1] from about 25 seconds down to about 3 seconds by freezing the modules like outlined by @robert-hh. The code base including all third-party modules is around 10 kLOC and we have released the result as builds called Annapurna [2]. With kind regards, Andreas. [1] https://github.com/hiveeyes/terkin-datalogger [2] https://community.hiveeyes.org/t/annapurna-firmware-for-pycom-esp32/2754
  • Pytrack power consumption

    Expansion Board pytrack expansion lopy power
    4
    0 Votes
    4 Posts
    663 Views
    J
    @james-matthews Depends what you mean by "idle". In Pytrack-assisted deep sleep it should be somewhere in the range of 10-20 µA. Once you wake up the ESP32 and/or radios whatever the Pytrack uses is drowned in the consumption of those. Note that in my experience, keeping the accelerometer active for wake-on-fall/tap/movement already brings power draw to several hundred µA rather than a few dozen as expected (but that was on the Pysense, and I haven't much investigated the cause for the issue since). I expect the GPS to be a lot more power-hungry, though there are probably standby modes and the like.
  • LoPy - Raw Lora mode for connecting TTN

    LoPy lora lorawan lora class node lopy
    4
    0 Votes
    4 Posts
    712 Views
    J
    @aniket_yeole you can change some of the parameters (including SF) using setsockopt. To change the frequency you’ll need to remove all channels and re-add channels with your chosen frequency. But beware, the network can change those settings via MAC commands.
  • LoPy vs L01 (OEM module)

    LoPy lopy lopy oem loramac
    7
    1
    0 Votes
    7 Posts
    870 Views
    A
    In case anybody else has this problem. In our case it was either a defective L01 OEM module or a manufacturing defect with the PCB. We built a second unit and the LoRa worked fine in that L01 module. It did not hang or crash, and the LoRa pings worked fine over several minutes of testing.
  • 0 Votes
    2 Posts
    463 Views
    D
    In my opinion RESET pin should not be left floating. Try to connect pull-up resistor to 3.3V in 10k-20k range. Check L01 OEM Baseboard schematic: https://docs.pycom.io/product-info-datasheets/oem/l01_reference Edit: Sorry, now I noticed the reset pull-up already being in your schematic. Anyway try to use FTP client for script uploading.
  • Direct LoPY-to-LoPY comms

    LoPy lopy
    1
    0 Votes
    1 Posts
    310 Views
    No one has replied
  • Uploading code without restarting the board

    LoPy lopy ftp vscode
    9
    0 Votes
    9 Posts
    1k Views
    R
    Hi guys, I didn't read everything below in detail, but I just wanted to add that the Pymakr package for Atom has an option for not rebooting after upload :) No need to switch to FTP if the reboot part is the issue. Actually, VSCode is supposed to have the same option, but when testing it just now it shows a bug (it doesn't show any output in the terminal after upload). I'm going to fix that now and add it in the next release. After that, you can add "reboot_after_upload" key to the global or project config file ("reboot_after_upload": false) and it will not reboot the board after uploading or downloading.
  • 0 Votes
    13 Posts
    1k Views
    O
    @robert-hh I looked at that device but I'm trying to keep my system as simple as possible so I did not pursue that option. I does, however, look like a viable alternative in the event your s/w solution was inadequate for some reason. thanks.
  • MicropyGPS: Failed to write file

    LoPy lopy micropython frozen modules micropygps
    16
    0 Votes
    16 Posts
    2k Views
    robert-hhR
    @paloma You can configure Filezilla in a way, that double-click on a file in the LoPy pane will open that file in your Favorite editor. Storing that file will transfer it back to the LoPy. For REPL, you might also use other tools like screen, picocom, putty, .., which support VT100 code sequences, in case you need them.
  • How Decrypt LoRa data

    LoPy lopy micropython decrypt
    4
    0 Votes
    4 Posts
    3k Views
    M
    @rcolistete Thank you for your time and explanation
  • View files created on flash

    LoPy lopy flash
    2
    0 Votes
    2 Posts
    580 Views
    robert-hhR
    @oved-yavine you can connect by ftp using tools like filezilla for plain ftp you can use "import uos;uos.listdir()" to get a list of files there is a useful python script called upysh.py which offers a small set of shell like commands at the REPL prompt. Import it with "from upysh import *", and then you have commands like ls, cat, .. (https://github.com/micropython/micropython-lib/tree/master/upysh)