Hi, I'm trying to make a class called le_led which will contain infos about a "pixel". I read the arduino tutorials and searched in the forums but I can't understand why it doesn't work.
My project have 4 files ("tabs") and the class is not declared in the main file. When I do the following in the main file:
le_led pixel01(byte(0), byte(0), byte(0));
I get the following error:
_04_Bi_Protocolo:49: error: 'le_led' does not name a type
I also noticed the the constructor takes a strange gray color.
Can somebody help me???
class le_led
{
public:
le_led(byte led_in_r, byte led_in_g, byte led_in_b);
void change_r(byte led_in_r);
void change_g(byte led_in_g);
void change_b(byte led_in_b);
void change(byte led_in, int led_rgb);
byte get_r();
byte get_g();
byte get_b();
void get(int led_rgb);
private:
byte led_r;
byte led_g;
byte led_b;
};le_led::le_led(byte led_in_r, byte led_in_g, byte led_in_b){
led_r = led_in_r;
led_g = led_in_g;
led_b = led_in_b;}
void le_led::change_r(byte led_in_r) { led_r = led_in_r; }
void le_led::change_g(byte led_in_g) { led_g = led_in_g; }
void le_led::change_b(byte led_in_b) { led_b = led_in_b; }byte le_led::get_r() { return led_r; }
byte le_led::get_g() { return led_g; }
byte le_led::get_b() { return led_b; }