File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
src/main/java/com/example/androidthings/imageclassifier Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ repositories {
3737}
3838
3939dependencies {
40- implementation ' com.google.android.things.contrib:driver-button:0.4'
40+ implementation ' com.android.support:support-annotations:27.1.0'
41+ implementation ' com.google.android.things.contrib:driver-button:0.6'
4142 implementation ' org.tensorflow:tensorflow-lite:0.1.1'
42- compileOnly ' com.google.android.things:androidthings:0.6.1 -devpreview'
43+ compileOnly ' com.google.android.things:androidthings:0.7 -devpreview'
4344}
Original file line number Diff line number Diff line change 4040import com .google .android .things .contrib .driver .button .Button ;
4141import com .google .android .things .contrib .driver .button .ButtonInputDriver ;
4242import com .google .android .things .pio .Gpio ;
43- import com .google .android .things .pio .PeripheralManagerService ;
43+ import com .google .android .things .pio .PeripheralManager ;
4444
4545import java .io .IOException ;
4646import java .util .ArrayList ;
@@ -105,9 +105,9 @@ private void init() {
105105 * This method should only be called when running on an Android Things device.
106106 */
107107 private void initPIO () {
108- PeripheralManagerService pioService = new PeripheralManagerService ();
108+ PeripheralManager pioManager = PeripheralManager . getInstance ();
109109 try {
110- mReadyLED = pioService .openGpio (BoardDefaults .getGPIOForLED ());
110+ mReadyLED = pioManager .openGpio (BoardDefaults .getGPIOForLED ());
111111 mReadyLED .setDirection (Gpio .DIRECTION_OUT_INITIALLY_LOW );
112112 mButtonDriver = new ButtonInputDriver (
113113 BoardDefaults .getGPIOForButton (),
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ buildscript {
1414
1515allprojects {
1616 repositories {
17+ google()
1718 jcenter()
1819 }
1920}
You can’t perform that action at this time.
0 commit comments