int vueltas = -515;
int a;
int b;
int c;
char buf[4];
void setup() {
// put your setup code here, to run once:
Serial.begin(9600); // open the serial port at 9600 bps:
a=((vueltas / 100) % 10);
b=((vueltas / 10) % 10);
c=((vueltas) % 10);
}
void loop() {
// put your main code here, to run repeatedly:
sprintf( buf, "%03d", vueltas );
Serial.println( buf );
/*
Serial.println(a);
Serial.println(b);
Serial.println(c);
Serial.println("");
*/
}