summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Colours.cpp15
-rw-r--r--Colours.h19
2 files changed, 34 insertions, 0 deletions
diff --git a/Colours.cpp b/Colours.cpp
new file mode 100644
index 0000000..4656a4c
--- /dev/null
+++ b/Colours.cpp
@@ -0,0 +1,15 @@
+/*
+ * Colours - library for managing the colours on RGB LEDs
+ */
+
+#include "WProgram.h"
+#include "Colours.h"
+
+Colours::Colours(int rPin,int gPin,int bPin) {
+ _rPin = rPin;
+ _gPin = gPin;
+ _bPin = bPin;
+ pinMode(_rPin,OUTPUT);
+ pinMode(_gPin,OUTPUT);
+ pinMode(_bPin,OUTPUT);
+}
diff --git a/Colours.h b/Colours.h
new file mode 100644
index 0000000..977531d
--- /dev/null
+++ b/Colours.h
@@ -0,0 +1,19 @@
+/*
+ * Colours - library for managing the colours on RGB LEDs
+ */
+
+#ifndef COLOURS_h
+#define COLOURS_h
+
+#include "WProgram.h"
+
+class Colours {
+ public:
+ Colours(int rPin,int gPin,int bPin);
+ private:
+ int _rPin;
+ int _gPin;
+ int _bPin;
+};
+
+#endif