i've tried to learn hot to create a new library , i did it all just as explained buy the site and still i had an error showing
this is the error
sketch_oct27a.cpp.o: In function setup': C:\Users\hagai\AppData\Local\Temp\build8272096594347651372.tmp/sketch_oct27a.cpp:8: undefined reference to Led::Led(int)'
this is my code
header:
#ifndef Led_h
#define Led_h
#include "Arduino.h"
class Led
{
public:
Led (int pin);
void on();
void off();
private:
int _pin;
};
#endif
you might need to restart the IDE before it "sees" your new library.
Please use the # button to post code, it will give you [ code] tags to make it look better (easier to read).
you can modify your post to do so. JUst select the .h part and press # (above the smileys)
Can you post your sketch that uses the library too?
I quickly went into my Sketchbook/libraries folder and created a Led folder and inside that created a Led.h and a Led.cpp. I cut and pasted from the code here and it compiled fine with the sketch provided here.