ArnieX / esp8266_dimmer_mqtt

ESP8266 (NodeMCU) dimmer control script, with End User WiFi setup, Arduino OTA, PlatformIO.
17 stars 4 forks source link

Changing from LOW driven to HIGH driven model #3

Open outnabout opened 7 years ago

outnabout commented 7 years ago

Hi,

what do I have to change to reverse your code from the LOW pin model to a HIGH pin Model.

int current_brightness = 100; // LED STRIP OFF (100), LED STRIP ON (0) My dimmer module is driven LOW so 100% is 0, 0% is 100

int brightness = 100-receivedBrightness; // Invert brightness received to reflect that the module I have is driven LOW

How did you find out you have a LOW Pin Model as an NodeMCU?

Best,

Alex

ArnieX commented 7 years ago

Hi Alex,

it is not NodeMCU that is low pin, it’s the dimmer module which is inverted opposed to some. To change it you would need to rewrite the code if you have dimmer that is inverted to the one I have. Or alternatively you can check out my other repo which is dimmer-firmware and that is for TJClemments dimmer module which I guess if I remember well is high instead of low. Hope this helps.

Martin

1043717432 commented 7 years ago

@ArnieX hi, appreciate your LED dimming method, please tell me the model of the hardware material, can you? Thank you!

ArnieX commented 7 years ago

All you need to know is at the image in readme.

LHeczko commented 5 years ago

Hi, I've got one little problem - when LED is off it still shines a little - any idea?

ArnieX commented 5 years ago

That is strange behaviour, could that be that the mosfet is malfunctioning?

LHeczko commented 5 years ago

But everything else works ok ;) Maybe I'll have to add NOT to this board to make it 0=0, max=max :) Or it can be a problem with 3.3V / 5V - my NodeMCU is 3.3V driven

ArnieX commented 5 years ago

All NodeMCU's ie. ESP8266 are 3,3V. This is strange, do you set really 0?

LHeczko commented 5 years ago

Yes :)

ArnieX commented 5 years ago

Then I'm out of ideas :D

LHeczko commented 5 years ago

Thanks - I'll check it with my electronic colleague :D One more idea = I've got it under RX - I'll delete all seriall comunication...