rjp350z wrote:Rince
Would be nice if you could share the 1284 code being that is what I still have on my sd3.
This way I can test live without having to do full conversion to the ramps at this point
Sure! I will do a proper pull request on Adrian's repo as son as I'm convinced that it actually works, but the modification in the end boils down to this in the Servo.h file:
-#elif defined(__AVR_ATmega32U4__)
+#elif defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1284P__)
that is, add ' || defined(__AVR_ATmega1284P__) ' at the end of that #elif line.
My servo is a bit buzzing and not moving so smoothly, but it works in principle. I am not sure why though.
As a sidenote, I moved my fan to pin 27 (the one immediately below the pin commonly used) because I thought I needed a PWM pin for the servo (I didn't) and the servo control pin is now pin 4. For this reason, I enabled the software PWM for the fan, and it works much better than with HW pwm (finer speed control).
So my pins.h file now has:
#define FAN_PIN 27 // FS: Pin 4 is used for the servo
#define FAN_SOFT_PWM
#ifdef NUM_SERVOS
#define SERVO0_PIN 4
#endif