This is how i got the hardware to work. Not saying that it cant work any other way. I haven't tied anything of yours in. So likely delete mine from rev 2 or 3, and then put this instead. Then it might work.

Dependencies:   mbed

Revision:
0:c426396d5fdf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rgb_led.h	Thu Jun 22 04:45:01 2017 +0000
@@ -0,0 +1,37 @@
+/*
+--------------------------------------------------------------------------------
+-- Project:         PRO2 "Awareness and Optimisation of energy consumption"
+-- Team:            Team 1
+
+-- File Name:       rgb_led.h
+-- Author:          Poul Erik Tjørnfelt
+-- Date:            07/05-2017
+-- Copyright:       Open to all
+-- Version:         0.6 - Creation of file.
+--                  1.0 - File approval.
+--
+-- Description:     The header file for a class, that creates instances of
+--                  the actual RGB lamp that is used.
+--
+--------------------------------------------------------------------------------
+*/
+
+#ifndef RGB_LED_H
+#define RGB_LED_H
+#include "mbed.h"
+
+class RGB_LED
+{
+public:
+    RGB_LED(PinName pin_R, PinName pin_G, PinName pin_B);
+    void set(float red, float green, float blue);
+    void flash(float per_r, float time_r, float per_g, float time_g,
+                float per_b, float time_b);
+
+private:
+    PwmOut pin_r;
+    PwmOut pin_g;
+    PwmOut pin_b;
+};
+
+#endif
\ No newline at end of file