# override printf

**URL:** <https://forums.digi.com/t/override-printf/9877>\
**Category:** Rabbit\
**Created:** [May 2, 2007, 3:30pm UTC](https://forums.digi.com/t/override-printf/9877 "2007-05-02T15:30:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![printf](https://avatars.discourse-cdn.com/v4/letter/p/c68b51/32.png) [@printf](https://forums.digi.com/u/printf)\
**Post date:** [May 2, 2007, 3:30pm UTC](https://forums.digi.com/t/override-printf/9877/1 "2007-05-02T15:30:23Z")

</div>

Hi! Is there a way to override the stdio function printf so that printf goes to my LCD driver? thanks!

---

<div class="post-metadata">

**Author:** ![Rob2](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@Rob2](https://forums.digi.com/u/Rob2)\
**Post date:** [May 2, 2007, 4:56pm UTC](https://forums.digi.com/t/override-printf/9877/2 "2007-05-02T16:56:22Z")

</div>

I don’t know if this will help but it is possible to redirect stdio to a serial port.  
see SAMPLES/STDIO\_SERIAL.C for an example.

If this doesn’t help perhaps you could use sprintf and then pass the resulting string to you LCD driver.

---

<div class="post-metadata">

**Author:** ![seulater](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@seulater](https://forums.digi.com/u/seulater)\
**Post date:** [May 3, 2007, 12:37pm UTC](https://forums.digi.com/t/override-printf/9877/3 "2007-05-03T12:37:42Z")

</div>

> [@Rob;376](#):
>
> If this doesn’t help perhaps you could use sprintf and then pass the resulting string to you LCD driver.

This is what your going to have to do.

---

<div class="post-metadata">

**Author:** ![printf](https://avatars.discourse-cdn.com/v4/letter/p/c68b51/32.png) [@printf](https://forums.digi.com/u/printf)\
**Post date:** [May 4, 2007, 9:58pm UTC](https://forums.digi.com/t/override-printf/9877/4 "2007-05-04T21:58:21Z")

</div>

Sounds good. I was trying to use straight debug output from library code in my application to output to LCD. But no, that’s okay.  
Thanks!  
Chris

---

<div class="post-metadata">

**Author:** ![seulater](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@seulater](https://forums.digi.com/u/seulater)\
**Post date:** [May 5, 2007, 12:00am UTC](https://forums.digi.com/t/override-printf/9877/5 "2007-05-05T00:00:22Z")

</div>

I thought thats what you might be doing, if you like i can look up some of my older code that does that.

---

<div class="post-metadata">

**Author:** ![printf](https://avatars.discourse-cdn.com/v4/letter/p/c68b51/32.png) [@printf](https://forums.digi.com/u/printf)\
**Post date:** [May 5, 2007, 1:41am UTC](https://forums.digi.com/t/override-printf/9877/6 "2007-05-05T01:41:23Z")

</div>

nah, don’t bother.  
Thanks,  
Chris
