contrib-drivers | Open source peripheral drivers

 by   androidthings Java Version: Current License: Apache-2.0

kandi X-RAY | contrib-drivers Summary

kandi X-RAY | contrib-drivers Summary

contrib-drivers is a Java library typically used in Internet of Things (IoT), Raspberry Pi applications. contrib-drivers has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub.

Android Things user-space drivers
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              contrib-drivers has a low active ecosystem.
              It has 543 star(s) with 172 fork(s). There are 76 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 29 open issues and 49 have been closed. On average issues are closed in 23 days. There are 7 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of contrib-drivers is current.

            kandi-Quality Quality

              contrib-drivers has 0 bugs and 0 code smells.

            kandi-Security Security

              contrib-drivers has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              contrib-drivers code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              contrib-drivers is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              contrib-drivers releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              It has 11658 lines of code, 1104 functions and 126 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed contrib-drivers and discovered the below as its top functions. This is intended to give you an instant insight into contrib-drivers implemented functionality, and help decide if they suit your requirements.
            • Initialize peripheral defaults
            • Set the repeat rate on input channels
            • Set the maximum number of touch events allowed by the device
            • Set the brightness of the led
            • Writes the current LED data to the device
            • Copy the brightness and color values from the given position to the given destination array
            • Enqueues a new print job
            • Reads the status of the given printer
            • Converts a bitmap image to a LCD screen data
            • Sets the specified pixel in the display buffer
            • Emits the input events through all registered input channels
            • Sends a frame
            • Initializes the communication between the device and the device
            • Prints a bitmap to the console
            • Read position data
            • Reads a single end - ended input channel
            • Resets the hardware
            • Connects to the given I2C port
            • Closes the device
            • Set the low thresholds for this device
            • Start scrolling
            • Starts the low access control module
            • Read data from the device
            • Initializes the I2cDevice
            • Connects the data to the device
            • Initializes the key code map
            Get all kandi verified functions for this library.

            contrib-drivers Key Features

            No Key Features are available at this moment for contrib-drivers.

            contrib-drivers Examples and Code Snippets

            No Code Snippets are available at this moment for contrib-drivers.

            Community Discussions

            QUESTION

            Using SharedPreferences in Android Things
            Asked 2019-Jun-23 at 23:01

            I am attempting to use SharedPreferences in my Things application, but it always returns 0 for some reason. My setter is getting is logging tht it pushed the right data using the editor, but every read, even after restarting the activity, is always 0. I can't find a reason why Things wouldn't allow use of SharedPreferences, even with a needed permission change, so I'm kind of at a loss. It's obviously my code, but I can't figure out why.

            My goal is to use a TextView which is touchable to simply update the date when touched. No buttons, no real interaction, and it's simple and clean. But if SharedPreferences doesn't work, this gets more difficult.

            I have been all over different ways of instantiating the SharedPreferences object, in OnCreate, each time I use it to no effect. I have also used a global and local editor to the Activity, to no effect. Writes seem to succeed, but reads always return 0 for getLong(). I switch from apply() to commit() thinking maybe it's just a timing problem. However, exiting and starting the activity again doesn't show a value either, it's still 0.

            What is included is the latest based on what I found in the Android documentation based on what I know about Java. The first is just what I believe to be relevant to the question. The second code sample is the full activity.

            ...

            ANSWER

            Answered 2019-Jun-23 at 15:28

            The method getLong returns a long, the second parameter to the method you're calling is not a reference to be filled, but the default value to be returned in case the preference is not found.

            Your code is simply not checking the return value from shared preferences.

            Source https://stackoverflow.com/questions/56716344

            QUESTION

            How to get speech regnition on android things app?
            Asked 2019-Jan-17 at 07:45

            Hi, I'm using:

            When I start speech recognizerintent it doesn't work and spend me this error:

            2018-12-12 14:35:14.064 6546-6546/tck.com.maggie E/SpeechRecognizer: no selected voice recognition service

            ¿How can i make it work?

            Notes: This work perfectly on smartphone, I don´t know if i need implement other driver for de mic and the speaker.

            ...

            ANSWER

            Answered 2018-Dec-12 at 14:23

            That means either the user doesn't have a speech recognizer installed at all, or doesn't have one configured to run. There's nothing you can do to fix that, the user has to install one.

            Source https://stackoverflow.com/questions/53745072

            QUESTION

            Android Things send GPS data to TextView
            Asked 2018-Nov-17 at 19:17

            I am using Android Things v1.0.1 with the Adafruit Ultimate GPS Breakout Board v3 on the Raspberry Pi 3.

            I am trying to display GPS information on screen, specifically sending Lat, Long, Altitude and number of satellites to individual TextViews on the display but I am struggling.

            The NMEA driver I am using is this: Github / Android Things / Contrib Drivers / GPS

            And here is my MainActivity:

            ...

            ANSWER

            Answered 2018-Jun-19 at 17:09

            Instead use the following in the onLocationChanged() method:

            Source https://stackoverflow.com/questions/50932499

            QUESTION

            Android Things GPS ArrayIndexOutOfBoundsException
            Asked 2018-Jun-26 at 18:37

            I am using the Adafruit Ultimate GPS Breakout v3 with Android Things on a raspberry Pi 3. Using the following driver:

            https://github.com/androidthings/contrib-drivers/tree/master/gps

            I am trying to show the current location in a TextView when a button is pressed. I can log the NMEA messages but get frequent Invalid GSV Messages. It also crashes quite quickly with an ArrayIndexOutOfBoundsException.

            Can somebody help please?

            Here is the log:

            :33:08.782 2536-2536/com.google.android.things.contrib.driver.gps I/zygote: Deoptimizing void com.google.android.things.contrib.driver.gps.NmeaParser.handleSatelliteData(java.lang.String[]) due to block bounds check elimination 06-19 08:33:08.783 2536-2536/com.google.android.things.contrib.driver.gps D/AndroidRuntime: Shutting down VM 06-19 08:33:08.791 2536-2536/com.google.android.things.contrib.driver.gps E/AndroidRuntime: FATAL EXCEPTION: main Process: com.google.android.things.contrib.driver.gps, PID: 2536 java.lang.ArrayIndexOutOfBoundsException: length=19; index=19 at com.google.android.things.contrib.driver.gps.NmeaParser.handleSatelliteData(NmeaParser.java:199) at com.google.android.things.contrib.driver.gps.NmeaParser.processMessageFrame(NmeaParser.java:101) at com.google.android.things.contrib.driver.gps.NmeaGpsModule.handleFrameEnd(NmeaGpsModule.java:206) at com.google.android.things.contrib.driver.gps.NmeaGpsModule.processBuffer(NmeaGpsModule.java:175) at com.google.android.things.contrib.driver.gps.NmeaGpsModule.readUartBuffer(NmeaGpsModule.java:160) at com.google.android.things.contrib.driver.gps.NmeaGpsModule.access$000(NmeaGpsModule.java:41) at com.google.android.things.contrib.driver.gps.NmeaGpsModule$1.onUartDeviceDataAvailable(NmeaGpsModule.java:138) at com.google.android.things.pio.UartDeviceImpl$UartDeviceCallbackDispatch.dispatchInterruptEvent(UartDeviceImpl.java:250) at com.google.android.things.pio.CallbackDispatch.onFileDescriptorEvents(CallbackDispatch.java:149) at android.os.MessageQueue.dispatchEvents(MessageQueue.java:284) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:325) at android.os.Looper.loop(Looper.java:142) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 06-19 08:33:08.804 2536-2536/com.google.android.things.contrib.driver.gps I/Process: Sending signal. PID: 2536 SIG: 9

            UPDATE:

            After changing the NmeaParser from 19 to 2 here:

            ...

            ANSWER

            Answered 2018-Jun-26 at 18:37

            The NmeaParser in the GPS driver was incorrectly handling GSV messages that were variable length. We just released a new v1.1 of the driver that fixes the parsing. You should update your app to point to the latest artifact:

            Source https://stackoverflow.com/questions/50924377

            QUESTION

            Android Things & Adafruit Ultimate GPS Breakout v3
            Asked 2018-Jun-07 at 16:56

            I am starting to play with the Adafruit Ultimate GPS Breakout v3 with Android Things v1.0.1 on the Raspberry Pi 3. I am using the code here: Github Contrib Drivers to try and get the GPS co-ordinates but I am not having any luck so I'm hoping somebody could point me in the right direction.

            The GpsModuleCallBack() isn't showing anything in the log.

            Here is my code:

            MainActivity.java

            ...

            ANSWER

            Answered 2018-Jun-07 at 16:56

            The Android Things drivers open the Peripheral ports for you, so you should not be accessing the UART directly from PeripheralManager AND using the driver. Remove the following block of code:

            Source https://stackoverflow.com/questions/50720319

            QUESTION

            Using the i2c smartdrive sensor with a Pio Cli commands to run motors
            Asked 2018-Feb-06 at 20:28

            This is my i2c sensor: http://www.mindsensors.com/rpi/76-smartdrive-high-current-motor-controller look in pdf in Documents sessions please

            Based on this google guide https://developer.android.com/things/sdk/pio/pio-cli.html What I need to put in XX ZZ YY UU to run motors in determined speed, direction, duration, etc...

            e.g.: pio i2c I2C1 0x1B write-reg-buffer 0xXX 0xYY 0xUU 0xZZ

            As (in this case) I will use writeRegBuffer() on my android things app to run one, two or both motors in determined spped, direction, duration, etc?

            e.g.: I used (via jcenter) this driver in intel edison/android things DP2, but now I want to create an AT driver to use smartdrive in nx pico and rpi 3, because there would be no more mraa:

            https://github.com/androidthings/contrib-drivers/issues/70

            My questions is: If you see here: https://github.com/intel-iot-devkit/upm/blob/master/src/smartdrive/smartdrive.hpp and especially in this: https://github.com/intel-iot-devkit/upm/blob/master/src/smartdrive/smartdrive.cxx in function

            ...

            ANSWER

            Answered 2018-Feb-06 at 20:28

            run motor 1 in direction A pio i2c I2C1 0x1B write-raw 0x46 128 0x05 0x00 0xD1

            run motor 1 in direction B pio i2c I2C1 0x1B write-raw 0x46 127 0x05 0x00 0xD1

            run motor 2 in direction A pio i2c I2C1 0x1B write-raw 0x4E 128 0x05 0x00 0xD1

            run motor 2 in direction B pio i2c I2C1 0x1B write-raw 0x4E 127 0x05 0x00 0xD1

            Source https://stackoverflow.com/questions/48368262

            QUESTION

            What's the .driver-metadata file used for in Android Things?
            Asked 2017-Jan-11 at 08:33

            I've noticed in the Android Things contrib-drivers repo there's a few of these .driver-metadata files (one in each different driver folder). Does anyone know what they're for?

            Example: https://github.com/androidthings/contrib-drivers/blob/master/rainbowhat/.driver-metadata

            Thanks!

            ...

            ANSWER

            Answered 2017-Jan-11 at 08:33

            It could that Google use a tool to autogenerate the table of available drivers in their README of the repository.

            You can see from this commit: https://github.com/androidthings/contrib-drivers/commit/194d09e8f4f0e0d5f8e0eef78ea26bdc8fa4fb5a

            That each of the drivers created the type from the .driver-metadata file:

            TYPE="RGB LED strip"

            matches the column type in the README table:

            | RGB LED strip |

            Further if a .driver-metadata has another key,value of sample this is also in the table (and if it doesn't then there is no sample link).

            This would mean (Google's side) if a driver was added/updated you would get automatic updates elsewhere.

            This is just theoretical, you need a Googler to confirm :-)

            Source https://stackoverflow.com/questions/41580386

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install contrib-drivers

            You can download it from GitHub.
            You can use contrib-drivers like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the contrib-drivers component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/androidthings/contrib-drivers.git

          • CLI

            gh repo clone androidthings/contrib-drivers

          • sshUrl

            git@github.com:androidthings/contrib-drivers.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link