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

    PMS5003 and FIPY powered by VIN

    Scheduled Pinned Locked Moved Comments & Feedback
    1 Posts 1 Posters 10 Views 1 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.
    • J Offline
      Jose Felipe Quevedo Lombardini
      last edited by

      I use the PMS5003 and taking UART readings, for a Indoor Air Quality project, when I have the FIPY connected with the USB port, it works and take readings, but when I power the FIPY(I am using the expansion board V3), it doesn´t take readings from PMS5003, I am using this code:

      TXP = 'P21'
      RXP = 'P20'
      
      uart1 = UART(1, baudrate=9600, pins=(TXP,RXP))
      pycom.heartbeat(False)
      buffer = []
      while True:
          data = uart1.read(32)  
          print(data)
          print("a")
          while (data == None):
              
                  data = uart1.read(32)
                  print("b")
                  pycom.rgbled(0x7f0000)#RED COLOR RGB
      
          if data:
              data = list(data)
              buffer += data
              pycom.rgbled(0x007f00) #GREEN COLOR RGB
              time.sleep(1)
      

      I use the FIPY RGB to know if the PYCOM is taking data or not, RED is when is not taking data, and GREEN is when you take data. PYCOM just take data when is connected by USB port instead of VIN.

      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