• LoPy4 LoRa Data Corruption

    lopy4 lora
    5
    0 Votes
    5 Posts
    1k Views
    sebS
    @ssmith Hi, You can find all the specs for the LoRa transceiver we're using on these modules here: LoPy: https://www.semtech.com/uploads/documents/sx1272.pdf LoPy4: https://www.semtech.com/uploads/documents/sx1276.pdf
  • How to update script on 100 boards

    lopy lora code firmware update firmware
    8
    0 Votes
    8 Posts
    2k Views
    G
    @seb It's my bad. I have missed that service was listening just on localhost, that's why I was not able to receive any file.
  • LoPy as a lightorgan via OSC

    osc micropython csound
    3
    0 Votes
    3 Posts
    666 Views
    Z
    @seb Sure. I'll share it here. Like I said it is very quick and dirty. It accepts an OSC message with only one variable (integer or float) of the form: '/adress1, if, value' integer (i) should also work. I do not parse the address tag(s). Also, in a normal OSC message multiple type tags can be used in one message, like: '/adress1, if, intval, floatval' That is not implemented. import socket import time import struct import pycom pycom.heartbeat(False) def readFloat(data): if(len(data)<4): print("Error: too few bytes for float", data, len(data)) rest = data float = 0 else: float = struct.unpack(">f", data[0:4])[0] rest = data[4:] return float def readInt(data): if(len(data)<4): print("Error: too few bytes for int", data, len(data)) rest = data integer = 0 else: integer = struct.unpack(">i", data[0:4])[0] rest = data[4:] return integer def getAdrVal(msg): if b',f' in msg: l = msg.find(b',f') vals = msg[l+4:] adress = msg[1:l-1] val = readFloat(vals) #print(adress,':',int(400*readFloat(val))) elif b',i' in msg: l = msg.find(b',i') vals = msg[l+4:] adress = msg[1:l-1] val = readInt(vals) else: print('not implemented') val = 0 adress = '' return(adress, int(200*val)) # UDP socket server serversocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) serversocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) serversocket.setblocking(True) serversocket.bind(('0.0.0.0', 9000)) # only bind, no accept like in TCP print('OSC server started') red, green, blue = 0,255,0 while True: data, src = serversocket.recvfrom(1024) if data: #print(data) adrVal = getAdrVal(data) if b'Lo' in adrVal[0]:red = min(adrVal[1],255) if b'Mid' in adrVal[0]:green = min(adrVal[1],255) if b'Hi' in adrVal[0]:blue = min(adrVal[1],255) pycom.rgbled(red*256*256 + green*256 + blue)
  • [beginner] can LoPy work alone

    lopy web page websocket wifi send data wifi
    4
    0 Votes
    4 Posts
    1k Views
    robert-hhR
    @pierrot10 Yes, you can use a FTDI cable, or a RasPi. YOu need to connect Tx, Rx and GND. Verify that the output voltage of the adaper is set to 3.3V, since ESP32 input are not 5V tolerant.
  • New order of LoPy - deep sleep issues?

    lopy deep sleep
    31
    1 Votes
    31 Posts
    11k Views
    S
    I'm using an Lopy4 powered by a Lifepo4 battery. For testing purposes I'm reading a sensor (bme280), sending the data using lora and then going to sleep for about 10 minutes.
  • ADC Pins Outputting Voltage?

    adc lopy voltage
    9
    0 Votes
    9 Posts
    2k Views
    C
    @robert-hh Sorry, I misunderstood. I didn't take the pin's voltage with the 1V connected, however I took the voltages of other pins without anything connected. I think the input-only pins were fine, as was pin 20 (and a few others) but some GPIO pins were outputting between 1-3 volts.
  • LoPy LoraWAN OTAA Deepsleep Example

    lorawan otaa deepsleep
    11
    0 Votes
    11 Posts
    4k Views
    papasmurphP
    @roadfox Late response, but this doesn't look like a correct approach, as the join (and send) might have failed. Next time it will detect that it comes out of deepsleep and assume that it has joined, which it hasn't, so "if boot" must be replaced by something like "if successfully joined and not boot".
  • LoPy4 i2c under Pins P13 to P18

    i2c lopy4 pins
    8
    0 Votes
    8 Posts
    2k Views
    R
    @robert-hh Okay, understood. Will test and update here with my findings. Thank you again @robert-hh for your great great support!
  • OSX Pymakr Atom plugin, not seeing lopy

    ftdi usb osx lopy pymakr
    8
    0 Votes
    8 Posts
    2k Views
    R
    @soren Sorry for the late reply. Atom currently always copies the top option in the list. If there is an actual Pycom serial detected, it will place that one at the top. Anyway, this is just a result of your issue, not the cause. So just to be sure, after rebooting your mac, you are able to connect to your device? Then when switching out to a different lopy, the comport disappears from the list of serials, even when closing the connection during the swap? Do you switch expansionboards, or just the lopy? You could even hot-swap your lopy while keeping the expansion board connected, see if that helps.
  • LoPy broadcasting network

    lora broadcast power
    8
    0 Votes
    8 Posts
    2k Views
    sebS
    @derchris said in LoPy broadcasting network: thank you @seb @bmarkus Alright, I misunderstood the device classes, so I guess Class-A is fine. Current (remember, newbie, but I have to start somewhere) is a LoPy as RX-only client and using a Laird Sentrinus Gateway for Multicast. TTN shows a blog post about OTA DFU here https://www.thethingsnetwork.org/article/firmware-updates-over-low-power-wide-area-networks/ and I think this is something I can take some ideas from Thats a very interesting read, this relies on the same trick @bmarkus suggested where all devices use the same IDs and keys to be able to receive the same messages.
  • Inspecting LoRa Memory

    lorawan otaa lopy
    2
    0 Votes
    2 Posts
    722 Views
    J
    @wstallwood As far as I know you can’t do it directly from micropython, but you could easily build a custom image from source adding a few logs where appropriate.
  • GPIO pin behaviour in Deep Sleep mode

    lopy gpio
    5
    0 Votes
    5 Posts
    1k Views
    W
    Just in case anyone else searches for this. Yes pin.hold works during a deep sleep but as obvious as it is now it only works on pins in the RTC domain on the pinout (and naturally not the input only pins). You can set pin.hold on any pin but it's only effective on those.
  • Changed settings are nog kept?

    atom settings
    3
    1
    0 Votes
    3 Posts
    776 Views
    Z
    @seb Thanks, I have noticed it also.
  • Forever changing colors

    rgbled
    4
    0 Votes
    4 Posts
    1k Views
    Z
    @livius Thanks!
  • .mpy files on LoPy 4

    lopy mpy mac
    7
    0 Votes
    7 Posts
    2k Views
    I
    @robert-hh No, that's not the problem. Commenting this (and related code) out made no change.
  • UART with nanogateway?

    nano gateway uart
    3
    0 Votes
    3 Posts
    974 Views
    G
    thanks but i was looking for how you can use it instead of Wifi forwarding he messages that normally are forwarded through Wifi to loraserver using Uart i think i'll need to design also a process on the other side to read uart and push it to loraserver I'll try to do it and see
  • lopy4 firmware, pymakr sync

    lopy4 bringup
    11
    1 Votes
    11 Posts
    3k Views
    G
    Just managed to update my pair of LoPy4s using lopyupdate from pycom_firmware_update_1.10.0.b2.tar.gz on Ubuntu 16.04 x86_64 and all is good. Now running 1.14.0.b1. My code using PyTrack GPS, wifi, MQTT, LoRa.LORA with socket.SOCK_RAW and AES with HMAC-MD5 all working as before with the old-fangled LoPys. I guess the dust has settled :) Edit: One LoPy4 was programmed on the Exp Brd 2 with jumper cable and the other on a PyTrack.
  • FTP issues, only FTP commands worked for me

    cyberduck textwrangler
    3
    0 Votes
    3 Posts
    869 Views
    Z
    @robert-hh Thanks, I read similar things in other posts. Also posted this to show an alternative that could be used.
  • Experience with Lopy and ADR (Adaptive Data Rate)

    lopy adr objenious ttn nemeus
    1
    1 Votes
    1 Posts
    1k Views
    No one has replied
  • Powering the LoPy with 2 AA batteries?

    lopy power battery powered battery
    12
    0 Votes
    12 Posts
    4k Views
    J
    @robert-hh Things are much better now it's wired correctly! :-) The batteries and the converter have been at room temperature for the last few hours and my LoPy and sensor are working fine. Thanks again for your help Robert.

Pycom on Twitter