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

    Pytrack and Pysense Libraries Release 1.0.0

    Scheduled Pinned Locked Moved Announcements & News
    pytrackpysenselibrary
    41 Posts 14 Posters 20.1k Views 15 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.
    • B Offline
      bucknall
      last edited by daniel

      Hi Everyone,

      Today we're sharing the first release version of the Pysense & Pytrack libraries. They're intended to get you up and running with your various Pycom boards/modules and allow you to start using the deep sleep functionality with your devices.

      The libraries have the basic functionality of all the sensors include and will be updated down the line to include additional features like interrupts, additional config for the sensors, etc.

      Please remember to update both your Pycom device (i.e. LoPy, SiPy, WiPy 2.0) as well as your Pysense & Pytrack before you get started. Check out these two links for how to update both devices (https://docs.pycom.io/pycom_esp32/pycom_esp32/getstarted.html#firmware-upgrades and https://docs.pycom.io/pycom_esp32/pycom_esp32/toolsandfeatures.html#updating-pysense-and-pytrack-firmware, respectively)

      Navigate to https://github.com/pycom/pycom-libraries to find the libraries you need. You'll want to grab the Pysense and Pytrack folders for your respective devices. Locate a lib folder for your Pysense/Pytrack; it will contain the various files for each sensor. There will be some examples to follow and the documentation will be updated to reflect the various sensors and changes that have taken place since!

      Thanks for your patience and we can't wait to see what you end up building with the new boards! Feel free to tweet them to us, at @pycomiot!

      All the best,

      The Pycom Team

      Developer Evangelist - Pycom

      A papasmurphP 2 Replies Last reply Reply Quote 1
      • A Offline
        amartinez Pybytes Beta @bucknall
        last edited by amartinez

        @bucknall I'm receiving a syntax error on the pytrack lib:

        line 8:
        "version = 1.0.0"

        L 1 Reply Last reply Reply Quote 0
        • papasmurphP Offline
          papasmurph @bucknall
          last edited by

          @bucknall I've rewritten the sensor classes to my liking (pressure instead of altitude, floating point values for all returns, slightly new function names) and for fixing several bugs and oddities. I don't intend to make a pull request, as this would deviate too much, so is there a way I can contribute the code back somehow, for your reference/comparison? It's regarding pysense.py, pytrack.py, LIS2HH12.py, LTR329ALS01.py, MPL3115A2.py and SI7006A20.py. For your info, _concat_hex is a very peculiar function, and completely replaced (I don't like "magic" in my code).

          B 1 Reply Last reply Reply Quote 1
          • L Offline
            livius @amartinez
            last edited by livius

            @amartinez said in Pytrack and Pysense Libraries Release 1.0.0:

            "version = 1.0.0"

            yes, it should be i suppose

            version = '1.0.0'
            

            it is not used anywhere

            think about people first, then computers

            A 1 Reply Last reply Reply Quote 0
            • A Offline
              amartinez Pybytes Beta @livius
              last edited by

              @livius Solved, but then, having this issue:

              <LIS2HH12 object at 3ffe7690>                                                                               
              <L76GNSS object at 3ffe7680>

              L 1 Reply Last reply Reply Quote 0
              • D Offline
                daniel
                last edited by

                @papasmurph please submit a pull request will all your changes, and we will take as much as possible from it. Thanks for contributing :-)

                1 Reply Last reply Reply Quote 0
                • B Offline
                  bucknall @papasmurph
                  last edited by

                  Hi @papasmurph, please do make a pull request, am always happy to consider improvements - this has been very much an out the door release as we've been pushing to get a minimum working library out the door for people to use!

                  Developer Evangelist - Pycom

                  papasmurphP 1 Reply Last reply Reply Quote 0
                  • papasmurphP Offline
                    papasmurph @bucknall
                    last edited by

                    @bucknall I don't use Github for other than complaining about things, so there's certainly some learning curve. It would have been much easier for me to just "zip" the things I changed and send it somehow. I hope that works. Otherwise this might take a few days due to other responsibilities.

                    B 1 Reply Last reply Reply Quote 0
                    • B Offline
                      bucknall @papasmurph
                      last edited by

                      Hi @papasmurph, feel free to send it to me (alex@pycom.io) and I'll look into implementing it for you :)

                      Developer Evangelist - Pycom

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

                        @amartinez said in Pytrack and Pysense Libraries Release 1.0.0:

                        <LIS2HH12 object at 3ffe7690>                                                                               
                        <L76GNSS object at 3ffe7680>

                        What issue? please describe it more..

                        think about people first, then computers

                        1 Reply Last reply Reply Quote 0
                        • G Offline
                          gertjanvanhethof Pybytes Beta
                          last edited by

                          dfu-util is not working somehow on my linux client.

                          dfu-util 0.8

                          Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
                          Copyright 2010-2014 Tormod Volden and Stefan Schmidt
                          This program is Free Software and has ABSOLUTELY NO WARRANTY
                          Please report bugs to dfu-util@lists.gnumonks.org

                          Match vendor ID from file: 04d8
                          Match product ID from file: f011
                          dfu-util: No DFU capable USB device available

                          What is going wrong?

                          papasmurphP J 2 Replies Last reply Reply Quote 0
                          • papasmurphP Offline
                            papasmurph @gertjanvanhethof
                            last edited by

                            @gertjanvanhethof Did you do the "press button before plugging in USB" bit?

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

                              @gertjanvanhethof
                              What @papasmurph said and you probably need to be root

                              papasmurphP 1 Reply Last reply Reply Quote 0
                              • C Offline
                                Camot
                                last edited by

                                I am not sure what the Pysense does, but it is not what I would expect. I am running the following code multiple times within a minute or so. Maybe someone could explain what the results mean. I have a BME280 here and it reports 24.7 C and a humidity of 47.06%. Temperature jumps between 31 and 4800, humidity between 48 and 2800. Pressure.temp is pretty stable but 5C off and why does the pressure sensor not Report pressure?. Ambient returns two values for Lux, both of them impossible during daylight.

                                from pysense import Pysense
                                from SI7006A20 import SI7006A20
                                from LTR329ALS01 import LTR329ALS01
                                from MPL3115A2 import MPL3115A2
                                
                                
                                py = Pysense()
                                pressure = MPL3115A2(py)
                                tempHum = SI7006A20(py)
                                ambientLight = LTR329ALS01(py)
                                
                                print (tempHum.humidity())
                                print (tempHum.temp('C'))
                                print (pressure.temp())
                                print (ambientLight.lux())
                                

                                I got the following results

                                >>>
                                2693.687
                                31.87222
                                30.5 
                                (21, 27)  
                                
                                >>>
                                48.81235 
                                4961.352
                                30.5
                                (8, 9)  
                                
                                >>> 
                                51.28427 
                                266.1942 
                                30.0
                                (7, 9)
                                
                                >>>
                                2849.983
                                4873.621
                                28.5625 
                                (7, 7)
                                
                                papasmurphP B 2 Replies Last reply Reply Quote 0
                                • papasmurphP Offline
                                  papasmurph @jmarcelino
                                  last edited by

                                  @jmarcelino That might even be needed on a Mac.

                                  1 Reply Last reply Reply Quote 0
                                  • papasmurphP Offline
                                    papasmurph @Camot
                                    last edited by

                                    @Camot I've sent Alex new code that should work better (no guarantees though), but temperature is off due to heating from the board. I changed the code to measure pressure instead of altitude.

                                    1 Reply Last reply Reply Quote 1
                                    • B Offline
                                      bucknall @Camot
                                      last edited by

                                      @Camot I'm investigating this today and will likely merge @papasmurph's code when I get a chance to review the changes

                                      Developer Evangelist - Pycom

                                      1 Reply Last reply Reply Quote 0
                                      • P Offline
                                        Pajarraco
                                        last edited by Pajarraco

                                        Maybe its a fool question, but when I try to download the new version 1.0.0 here: https://docs.pycom.io/pycom_esp32/pycom_esp32/toolsandfeatures.html#updating-pysense-and-pytrack-firmware

                                        The download file has the name pytrack/pysense_0.0.2.dfu and not 1.0.0.dfu or something like that.

                                        By the way, I just got working the accelerometer in both pytrack and pysenses, but the humidity, temperature, or glonass sensors don't work :(. May i wait some days more or is something that I have done wrong?

                                        Edit: well, seems that i misunderstood the concept of the version of the DFU and the version of the Pytrack/Pysense libraries...
                                        Futhermore, in the case of the Pysense, i forgot to print the values...Thanks to @Camot I could obtain some values but indeed, they are a bit unstable. About the Pytrack,I cannot get the coords. I modified the read function in order to print what it reads and well, it doesn't appear the word GNGLL so it is stuck in an infinite loop. Any ideas?

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

                                          @Pajarraco
                                          Where do you have pytrack inside building? On it work for me.

                                          think about people first, then computers

                                          P 1 Reply Last reply Reply Quote 0
                                          • P Offline
                                            Pajarraco @livius
                                            last edited by

                                            @livius I was running next to a window and it didnt work for me. Now I have just peeped the Pytrack outside with one hand and running the script and I could obtain the coords outside and inside. A little strange but well, it works :)

                                            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
                                            • 2
                                            • 3
                                            • 1 / 3
                                            • First post
                                              Last post

                                            Pycom on Twitter

                                            Pycom