-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a device similar to i2c interface, but it is not a standard protocol like i2c. What should I do #116
Comments
How to independently control SCK and sdio on raspberry pi |
The best option is to open a bunch of GPIO ports on the Pi and bit-bang on the clock and data lines through software. |
There are examples? |
I don't think there's an example for Android Things. It'd be tough to have a good example, as you'd have to do it for every specific subformat that exists. |
I think GPIO for java can't do that. SDIO and SCLK can be control by ndk ? |
@jmying The driver for TM1637 displays is bit-banging kind of a I2C protocol over custom GPIOs (using Java), I guess that is exactly what you'll want: https://github.com/androidthings/contrib-drivers/blob/master/tm1637/src/main/java/com/google/android/things/contrib/driver/tm1637/I2cBitBangDevice.java |
@nohum thanks ~ |
and thanks @Fleker |
@nohum Can you help me again |
Depending on what you mean with "delay" you could either
If you go with option one just pay attention that you do not sleep on the main thread as this will stall the whole app. |
I need to control the clock and IO data myself
The text was updated successfully, but these errors were encountered: