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

    SiPy UART read with RS485 communication

    Scheduled Pinned Locked Moved SiPy
    sipyuartcommunicationarduino
    2 Posts 2 Posters 1.4k 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
      huynhvak
      last edited by

      Hello, I'm trying to communicate with an Arduino through a RS485 module.
      Writing from the SiPy to the Arduino works, however the opposite doesn't.
      When I try to read the UART, it either returns the TX buffer or nothing.

      Here's my configuration :
      RS485 RO <=> SiPy expansion board G24
      RS485 DI <=> SiPy expansion board G11
      RS485 Enable transmission/ Enable reception jumped together <=> SiPy expansion board G16

      My code to set the uart and pin :

      from machine import UART
      from machine import Pin

      uart = UART(1, 9600)
      uart.init(9600, bits = 8, parity = None, stop = 1, pins = ('P3', 'P4') )#TX/RX

      p_out = Pin('P9', mode = Pin.OUT)

      I already checked if the signal is going through the RS485 and it does.
      I don't know where the problem could be.

      1 Reply Last reply Reply Quote 0
      • B Offline
        bnjroos
        last edited by

        To enable reception you need to put your p_out to FALSE.

        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