Skip to content

Commit a479760

Browse files
author
JP
committed
added PLUGIN, UNPLUG events and changed many more. README for details
1 parent ad0089e commit a479760

File tree

10 files changed

+4038
-56
lines changed

10 files changed

+4038
-56
lines changed

Ninja/Ninja.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
// This part defines which version to use when compile
55
// Only one define is allowed.
66

7-
//#define V11 1
8-
#define V12 1
9-
#define VERSION_NO "041"
7+
#define V11 1
8+
//#define V12 1
9+
#define VERSION_NO "042"
1010

1111
#if defined(V12) && defined(V11)
1212
#error Please select only a version by setting either V11 or V12.
@@ -27,8 +27,14 @@
2727
#define RED_LED_PIN 10
2828
#define GREEN_LED_PIN 11
2929
#define BLUE_LED_PIN 9
30+
31+
#define RED_STAT_LED_PIN 12
32+
#define GREEN_STAT_LED_PIN 8
33+
#define BLUE_STAT_LED_PIN 7
34+
3035
#define RX433_INT 0
3136
#define TX433_PIN 4
37+
3238
#endif
3339

3440
// Analog PIN Port 1

Ninja/NinjaArduino/NinjaArduino.ino

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,26 @@
1010

1111
void setup()
1212
{
13-
Serial.begin(9600);
14-
pinMode(RED_LED_PIN, OUTPUT);
15-
pinMode(GREEN_LED_PIN, OUTPUT);
16-
pinMode(BLUE_LED_PIN, OUTPUT);
17-
digitalWrite(RED_LED_PIN, HIGH); // set the RED LED Off
18-
digitalWrite(GREEN_LED_PIN, HIGH); // set the GREEN LED Off
19-
digitalWrite(BLUE_LED_PIN, HIGH); // set the BLUE LED Off
13+
Serial.begin(9600);
14+
pinMode(RED_LED_PIN, OUTPUT);
15+
pinMode(GREEN_LED_PIN, OUTPUT);
16+
pinMode(BLUE_LED_PIN, OUTPUT);
17+
digitalWrite(RED_LED_PIN, HIGH); // set the RED LED Off
18+
digitalWrite(GREEN_LED_PIN, HIGH); // set the GREEN LED Off
19+
digitalWrite(BLUE_LED_PIN, HIGH); // set the BLUE LED Off
20+
21+
#ifdef V12
22+
pinMode(RED_STAT_LED_PIN, OUTPUT);
23+
pinMode(GREEN_STAT_LED_PIN, OUTPUT);
24+
pinMode(BLUE_STAT_LED_PIN, OUTPUT);
25+
digitalWrite(RED_STAT_LED_PIN, HIGH); // set the RED STAT LED Off
26+
digitalWrite(GREEN_STAT_LED_PIN, HIGH); // set the GREEN STAT LED Off
27+
digitalWrite(BLUE_STAT_LED_PIN, HIGH); // set the BLUE STAT LED Off
28+
#endif
2029
}
2130

2231
void loop()
2332
{
24-
nOBJECTS.sendObjects(); // Send Ninja Objects
25-
nOBJECTS.doReactors(); // Receive Ninja Objects reactors
33+
nOBJECTS.sendObjects(); // Send Ninja Objects
34+
nOBJECTS.doReactors(); // Receive Ninja Objects reactors
2635
}

0 commit comments

Comments
 (0)