allpowerlabs / KS_Engine3

KS_Engine3 is the depreciated sketch used to run the Power Pallet
3 stars 2 forks source link

Use digitalWrite instead of analogWrite for non-PWM FET functions #15

Open allpowerlabs opened 13 years ago

allpowerlabs commented 13 years ago

To avoid issues caused by Servo lib

nanomonkey commented 12 years ago

Updated all analogWrite's to digitalWrites except for the following in Reactor:

if FET_BLOWER != ABSENT

blower_dial = analogRead(ANA_BLOWER_DIAL); analogWrite(FET_BLOWER,blower_dial/4);

endif

Not sure if this is even used. This was the only instance of an analogWrite that wasn't a HIGH or LOW value.

nanomonkey commented 12 years ago

The Servo library supports up to 12 motors on most Arduino boards and 48 on the Arduino Mega. On boards other than the Mega, use of the library disables analogWrite() (PWM) functionality on pins 9 and 10, whether or not there is a Servo on those pins. On the Mega, up to 12 servos can be used without interfering with PWM functionality; use of 12 to 23 motors will disable PWM on pins 11 and 12.