douban.fm.arduino 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/douban_fm/douban_fm.ino +3 -3
- data/lib/douban.fm.arduino/version.rb +1 -1
- metadata +4 -4
data/douban_fm/douban_fm.ino
CHANGED
@@ -2,7 +2,7 @@ int LENGTH = 3;
|
|
2
2
|
|
3
3
|
int ledPins[] = {12, 11, 10};
|
4
4
|
int buttonPins[] = {5, 4, 3};
|
5
|
-
int channelIds[] = {0, 32,
|
5
|
+
int channelIds[] = {0, 32, -1};
|
6
6
|
|
7
7
|
void setup() {
|
8
8
|
Serial.begin(9600);
|
@@ -15,14 +15,14 @@ void setup() {
|
|
15
15
|
void loop() {
|
16
16
|
for (int i = 0; i < LENGTH; ++i) {
|
17
17
|
if (digitalRead(buttonPins[i])) {
|
18
|
-
|
18
|
+
switchChannel(i);
|
19
19
|
}
|
20
20
|
}
|
21
21
|
|
22
22
|
delay(1);
|
23
23
|
}
|
24
24
|
|
25
|
-
void
|
25
|
+
void switchChannel(int which) {
|
26
26
|
for (int i = 0; i < LENGTH; ++i) {
|
27
27
|
if (i == which) {
|
28
28
|
digitalWrite(ledPins[i], HIGH);
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: douban.fm.arduino
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: serialport
|
16
|
-
requirement: &
|
16
|
+
requirement: &70107657473900 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - =
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 1.1.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70107657473900
|
25
25
|
description: douban.fm.arduino
|
26
26
|
email:
|
27
27
|
- hxliang1982@gmail.com
|