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

    Need help

    Scheduled Pinned Locked Moved LoPy
    lopyloraadcsensors
    6 Posts 4 Posters 1.2k Views 4 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.
    • M Offline
      MrBomBasTiKs
      last edited by

      Hello,

      I'm a french student and with my team we want to create a smart meter with a light sensor. So we bought 2 kit LoPy with 2 expansions board and 2 antenna. We want to connect this 2 cards far from them using LoRa but we don't have any knowledge on python. We only learned Arduino. So I want to know how to use a basic light sensor with the LoPy card.

      sebS J 2 Replies Last reply Reply Quote 0
      • sebS Offline
        seb @MrBomBasTiKs
        last edited by

        @mrbombastiks

        Do you know what particular light sensor you will be using for your project? Some just provide an analog voltage, others have digital interfaces.

        1 Reply Last reply Reply Quote 0
        • J Offline
          jcaron @MrBomBasTiKs
          last edited by

          @mrbombastiks You could have used a Pysense which has a light sensor built-in (if by light sensor you mean something that measures ambient light level).

          1 Reply Last reply Reply Quote 0
          • M Offline
            MrBomBasTiKs
            last edited by

            Hello, sorry for the overdue.

            I'm using a basic lightsensor wich is used with arduino as you can see on this picture : text alternatif

            L 1 Reply Last reply Reply Quote 0
            • L Offline
              livius @MrBomBasTiKs
              last edited by livius

              @mrbombastiks
              If you need the value from your analog light sensor
              then simply use ACD for this e.g:

              from machine import ADC
              adc = ADC(0)
              light = adc.channel(pin='P13',attn=ADC.ATTN_11DB)
              #read current light value
              value = light()
              

              think about people first, then computers

              M 1 Reply Last reply Reply Quote 0
              • M Offline
                MrBomBasTiKs @livius
                last edited by

                @livius
                I'm actually using this code, because I'm looking to get the blink of the meter.

                text alternatif

                Know I need to find when the led is blinking, because he send everytime the value. I want to know how to check the difference between this value and the last one.

                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