| Index: samples/raspberry_pi/basic/buzzer.dart
|
| diff --git a/samples/raspberry_pi/basic/buzzer.dart b/samples/raspberry_pi/basic/buzzer.dart
|
| index 7db8aa3f5565b313d8a35eaa8df74a84eb79f06f..24dc3481d4598c9a2bfed3335ad7121df0bebb74 100644
|
| --- a/samples/raspberry_pi/basic/buzzer.dart
|
| +++ b/samples/raspberry_pi/basic/buzzer.dart
|
| @@ -8,14 +8,16 @@
|
| // https://storage.googleapis.com/fletch-archive/images/buzzer-schematic.png
|
|
|
| import 'package:gpio/gpio.dart';
|
| +import 'package:raspberry_pi/raspberry_pi.dart';
|
|
|
| main() {
|
| // GPIO pin constants.
|
| const int button = 16;
|
| const int speaker = 21;
|
|
|
| - // Initialize GPIO and configure the pins.
|
| - PiMemoryMappedGPIO gpio = new PiMemoryMappedGPIO();
|
| + // Initialize Raspberry Pi and configure the pins.
|
| + RaspberryPi pi = new RaspberryPi();
|
| + PiMemoryMappedGPIO gpio = pi.memoryMappedGPIO;
|
| gpio.setMode(button, Mode.input);
|
| gpio.setMode(speaker, Mode.output);
|
|
|
|
|