douban.fm.arduino 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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, 8};
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
- turnOnLed(i);
18
+ switchChannel(i);
19
19
  }
20
20
  }
21
21
 
22
22
  delay(1);
23
23
  }
24
24
 
25
- void turnOnLed(int which) {
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);
@@ -1,3 +1,3 @@
1
1
  module DoubanFMArduino
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
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.0
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-22 00:00:00.000000000 Z
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: &70182190488160 !ruby/object:Gem::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: *70182190488160
24
+ version_requirements: *70107657473900
25
25
  description: douban.fm.arduino
26
26
  email:
27
27
  - hxliang1982@gmail.com