| Index: samples/raspberry_pi/basic/blinky.dart
|
| diff --git a/samples/raspberry_pi/basic/blinky.dart b/samples/raspberry_pi/basic/blinky.dart
|
| index fb688a95ab4861678a74e67f9a633e8a7af27d36..a7cf028626fcf66a3beca563946a4e47ecd80575 100644
|
| --- a/samples/raspberry_pi/basic/blinky.dart
|
| +++ b/samples/raspberry_pi/basic/blinky.dart
|
| @@ -6,14 +6,18 @@
|
| // Raspberry Pi 2 activity LED.
|
|
|
| import 'package:gpio/gpio.dart';
|
| +import 'package:raspberry_pi/raspberry_pi.dart';
|
| import 'package:os/os.dart';
|
|
|
| main() {
|
| // Constant for the Raspberry Pi 2 onboard green LED.
|
| const int led = 47;
|
|
|
| - // Initialize gpio and configure the pin.
|
| - PiMemoryMappedGPIO gpio = new PiMemoryMappedGPIO();
|
| + // Initialize Raspberry Pi and configure the activity LED to be GPIO
|
| + // controlled.
|
| + RaspberryPi pi = new RaspberryPi();
|
| + pi.leds.activityLED.setMode(OnboardLEDMode.gpio);
|
| + GPIO gpio = pi.memoryMappedGPIO;
|
| gpio.setMode(led, Mode.output);
|
|
|
| // Turn LED on and off in a continuous loop.
|
|
|