Closed YuchengWang closed 7 years ago
Those are two different samples.
The schematics for the first one you linked (BoardDefaults) is https://github.com/androidthings/sample-simplepio/blob/master/pwm/rpi3_schematics.png and it correctly connects to the PWM0 (it's for a servo)
The second link is the schematics of the native PWM speaker sample and its code is correctly pointing to PWM1: https://github.com/androidthings/sample-nativepio/blob/master/speaker/src/main/cpp/speaker.cpp#L51
https://github.com/androidthings/sample-simplepio/blob/master/pwm/src/main/java/com/example/androidthings/simplepio/BoardDefaults.java line 42: case DEVICE_RPI3: return "PWM0";
but https://github.com/androidthings/sample-nativepio/blob/master/speaker/rpi3_schematics.png connect PWM1 here.