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

    CCS811 library ?

    Scheduled Pinned Locked Moved MicroPython
    ccs811micropythoni2c
    6 Posts 3 Posters 2.3k Views 3 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
      Jiemde Pybytes Beta
      last edited by

      Hello, is someone had developped a library for the CCS811 (CO2/TVOC chip) ?
      I'm trying to adapt an raspi lib from Sparkfun exemple, but I'm loosed with the I2C readfrom_mem() and Writeto_mem()
      Thanks for help!
      Jiemde

      1 Reply Last reply Reply Quote 0
      • rcolisteteR Offline
        rcolistete
        last edited by rcolistete

        There is Circuit Python driver for CCS811 :
        https://github.com/adafruit/Adafruit_CircuitPython_CCS811
        It has I2C init differences from MicroPython, but it should not be difficult to convert this driver to (Pycom) MicroPython.

        My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          Jiemde Pybytes Beta @rcolistete
          last edited by

          Hi @rcolistete, Thanks for your answer, but I already use this lib for inspiration and not only I2C init differences.

          for example:

          setting = i2c.readfrom_mem(device, CSS811_MEAS_MODE, 1) give me a result like this: b'\xfd'
          setting = ~(0b00000111 << 4 ) must be 10001111 = 143 as result but the result is -113 causing by the first 1
          and I also have an " typeError: unsupported types for : 'bytes', 'str'
          Jiemde

          ledbelly2142L 1 Reply Last reply Reply Quote 0
          • ledbelly2142L Offline
            ledbelly2142 @Jiemde
            last edited by

            @jiemde did you get the CCS811 to work? Looks like an interesting sensor with both eCO2 and VOCs.

            Friends don't let friends run with scissors

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              Jiemde Pybytes Beta @ledbelly2142
              last edited by

              Hi @ledbelly2142 Happy New year 2018 !
              Yes it work ! find the class at https://gist.github.com/jiemde/481161c426c90c73e52aa51acfd94c2b and a testing Wipy with differents sensors at https://thingspeak.com/channels/77198
              Best regards, Jiemde

              ledbelly2142L 1 Reply Last reply Reply Quote 1
              • ledbelly2142L Offline
                ledbelly2142 @Jiemde
                last edited by

                @jiemde Thanks! I forked it.
                Cheers!

                Friends don't let friends run with scissors

                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