Search found 4 matches

by happytoto
Fri Sep 04, 2020 1:17 pm
Forum: General discussion
Topic: Marlin FW - Analogwrite for PWM control
Replies: 8
Views: 5106

Re: Marlin FW - Analogwrite for PWM control

After trial and error, I think there is a bug (feature?) somewhere. If I set 12bit resolution, I get the max_brightness for 2^(res+4) or 65535. I am not quite sure why. here is the simple code to test: #include <math.h> int ledPin = 29; // LED connected to digital pin 29 int max_fade; int step_i; in...
by happytoto
Wed Sep 02, 2020 9:12 am
Forum: General discussion
Topic: Marlin FW - Analogwrite for PWM control
Replies: 8
Views: 5106

Re: Marlin FW - Analogwrite for PWM control

Following the first feedback. in the simple arduino example, I added analogWriteResolution(4) and I then got the full brightness range. Tried with a resolution of 8 but didn't get the full brightness for fade value of 0-255. I am not quite sure why. I am left to ponder what is the right resolution 8...
by happytoto
Sat Aug 29, 2020 2:38 pm
Forum: General discussion
Topic: Marlin FW - Analogwrite for PWM control
Replies: 8
Views: 5106

Marlin FW - Analogwrite for PWM control

Hello, I am currently playing with my 3D printer to add some LED strip. In the Marlin FW, the RGBW leds are controlled with an Analogwrite function such as in the standard arduino example: void loop() { // fade in from min to max in increments of 5 points: for (int fadeValue = 0 ; fadeValue <= 255; ...

Go to advanced search