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 using PySense temp/hum sensor

    Scheduled Pinned Locked Moved Expansion Board
    pysensewipy 3.0
    3 Posts 2 Posters 954 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.
    • J Offline
      jhollan3
      last edited by

      I'm trying to read the temperature from the PySense board and am running to errors I can't figure out. Here is my code, which I based on the example for PyTrack and the API documentation:

      from SI7006A20 import SI7006A20
      from pysense import Pysense
      import time
      
      py = Pysense()
      sensor = SI7006A20()
      
      while True:
          print(sensor.humidity())
          print(sensor.temperature())
          time.sleep(1)
      

      This is the error in Pycom Console

      Traceback (most recent call last):
        File "main.py", line 2, in <module>
      ImportError: no module named 'SI7006A20'
      MicroPython v1.8.6-849-83e2f7f on 2018-03-19; WiPy with ESP32
      

      What am I doing wrong? Thanks for the help!

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jmarcelino @jhollan3
        last edited by

        @jhollan3
        You probably need to add the sensor libraries to your lib/ folder on the device.

        Please check if you have SI7006A20.py there (directly on /flash/lib)

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          jhollan3 @jmarcelino
          last edited by

          This post is deleted!
          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