I´m using this sensor and in all codes they used LOW (to turn on the led) and HIGH (to turn off the led), I supposed they all are incorrect, but I take some samples and sesnor records very well using this "inverted" command, What do you know about it?
You’re right. Because pure sensor uses inverted and waveshare adapter inverts it. So, I have this code:
//by default this program is configured for Waveshare Dust Sensor board//if you use GP2Y1010AU0F only then uncomment following line//#define PURE_SHARP_GP2Y1010AU0F // uncomment it if you use GP2Y1010AU0F#if defined (PURE_SHARP_GP2Y1010AU0F)    #define IR_LED_ON  LOW    #define IR_LED_OFF  HIGH    #define DIV_CORRECTION  1.0#else    //in case if you use http://www.waveshare.com/wiki/Dust_Sensor    #define IR_LED_ON  HIGH    #define IR_LED_OFF  LOW    #define DIV_CORRECTION  11.0 //Waveshare uses volt divider 1k/10k, so corection is needed#endif








