Go Down

Topic: Will this work on Due (ARM): sprintf(buffer, "x = %f", x); (Read 594 times) previous topic - next topic

codom

I know that AVR microcontrollers are unable to print floats using sprintf, but can the Due, an ARM controller, do the following:

Code: [Select]
void setup(){
  Serial.begin(9600);
  while(!Serial);
 
  char buffer[15];
  float x = 1.23;
  sprintf(buffer, "x = %f", x);
  Serial.print(buffer);
}

void loop(){
}

codom

Never mind.  I found someone local who had a Due board and tested it.  It does, in fact, work fine.

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