OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016, the Dartino project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 |
| 5 import "dart:dartino"; |
| 6 import "dart:async"; |
| 7 import "package:lk/leds.dart"; |
| 8 |
| 9 void main() { |
| 10 // Start up some timers. Note that timers in dartino are based on fibers, |
| 11 // so even though the main fiber ends, the timers will keep running. |
| 12 new Timer.periodic(const Duration(milliseconds: 50), (_) => LED0.toggle()); |
| 13 new Timer.periodic(const Duration(milliseconds: 100), (_) => LED1.toggle()); |
| 14 new Timer.periodic(const Duration(milliseconds: 75), (_) => LED2.toggle()); |
| 15 new Timer.periodic(const Duration(milliseconds: 333), (_) => LED3.toggle()); |
| 16 } |
OLD | NEW |