Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: dart/examples/led/led.dart

Issue 1684433003: Add a small LED interface and demo app. (Closed) Base URL: git@github.com:domokit/sod.git@master
Patch Set: added comment Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 }
OLDNEW
« no previous file with comments | « app/dartino/rules.mk ('k') | dart/pkg/lk/lib/leds.dart » ('j') | dart/pkg/lk/lib/leds.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698