Go Down

Topic: Setzten von 'L'/'UL' bei Berechnungen (Read 149 times) previous topic - next topic

sschultewolter

Mar 10, 2014, 10:14 pm Last Edit: Mar 11, 2014, 12:30 am by sschultewolter Reason: 1
Gelöst!
Code: [Select]
const int MAX_DURATION = 32000;
const int MIN_DURATION = 2000;
const int MIN_SPEED = 0;
const int MAX_SPEED = 15;

int duration = MAX_DURATION + (speed - MIN_SPEED) * (MIN_DURATION - MAX_DURATION) / (MAX_SPEED - MIN_SPEED);
static int lastDuration;
if (lastDuration != duration) {
lastDuration = duration;
printf("\n%i", duration);
}
Keinen technischen Support ├╝ber PN!

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy