# OT Wolle erklärt formatierte Ausgabe

**URL:** <https://forum.arduino.cc/t/ot-wolle-erklart-formatierte-ausgabe/1297213>\
**Category:** Deutsch\
**Created:** [August 31, 2024, 8:10pm UTC](https://forum.arduino.cc/t/ot-wolle-erklart-formatierte-ausgabe/1297213 "2024-08-31T20:10:15Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![combie](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/combie/32/217369_2.png) [@combie](https://forum.arduino.cc/u/combie)\
**Post date:** [August 31, 2024, 10:00pm UTC](https://forum.arduino.cc/t/ot-wolle-erklart-formatierte-ausgabe/1297213/5 "2024-08-31T22:00:19Z")

</div>

Hmmm....

Bei Wolle steht leider nicht, wie man printf mit Arduinos nutzen kann.

Also hier mal die nötige Ergänzung:

```arduino
int writeChar(char c, FILE *)
{
  return !Serial.write(c);
}

int readChar(FILE *)
{
   int c;
   while(-1 == (c=Serial.read()));
   return c;
}

FILE stdiostream;

void setup() 
{
  fdev_setup_stream(&stdiostream, writeChar, readChar, _FDEV_SETUP_RW);
  stdin = stdout = stderr = &stdiostream;

  
  Serial.begin(9600);

  signed value = 72;
  printf("testHex 0x%02X\r\n",value);
  printf("testDezimal %02d\r\n",value);
}

void loop()
{
}

```

---

_[View the full topic](https://forum.arduino.cc/t/ot-wolle-erklart-formatierte-ausgabe/1297213)._
