Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Error when send data on LORA ?

    Scheduled Pinned Locked Moved LoPy
    2 Posts 2 Posters 30 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Haruko viet nam
      last edited by

      Im trying to learn how this works.... I dont get it still...

      It wont work, I was thinking it has to do with the recv part,
      maybe it has not the time to handle the bytes that are sent to the lopy.

      '''

      from network import LoRa
      import socket
      import time
      import pycom
      import os
      import gc

      #os.uname()
      #os.getcwd() # Check where in the filesystem you are

      pycom.heartbeat(False)
      for cycles in range(1): # stop after 1 cycles
      time.sleep(1)

      lora = LoRa(mode=LoRa.LORA,tx_power = 14, sf = 7, frequency=863000000)
      s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
      s.setblocking(False)

      gc.enable()

      i = 0
      failed = 0
      counter_sent = 0
      counter_received = 0

      '''

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jcaron @Haruko viet nam
        last edited by

        @Haruko-viet-nam What do you expect this do do? You probably didn't copy the full code, this code doesn't do anything at all.

        Note that to quote code you should use backticks rather than quotes

        ``` not '''
        

        Or click on one of the </> buttons in the toolbar.

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post

        Pycom on Twitter

        Pycom