# Bypass Serial.println in Code?

**URL:** <https://forum.arduino.cc/t/bypass-serial-println-in-code/1120000>\
**Category:** Programming\
**Created:** [April 26, 2023, 9:05pm UTC](https://forum.arduino.cc/t/bypass-serial-println-in-code/1120000 "2023-04-26T21:05:06Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![gcjr](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/gcjr/32/314015_2.png) [@gcjr](https://forum.arduino.cc/u/gcjr)\
**Post date:** [April 27, 2023, 8:56am UTC](https://forum.arduino.cc/t/bypass-serial-println-in-code/1120000/23 "2023-04-27T08:56:00Z")

</div>

> [@Thunderhead289](#):
>
> just has to be a better way to enable and disable serial output without if statements everywhere

could define a "null" serial device and use a serial ptr (i.e. someSerial-\>println()). the serial-ptr can be set to the null device when no output is desired and set to a valid serial device when it it desired

---

<div class="post-metadata">

**Author:** ![Thunderhead289](https://avatars.discourse-cdn.com/v4/letter/t/b4bc9f/32.png) [@Thunderhead289](https://forum.arduino.cc/u/Thunderhead289)\
**Post date:** [April 27, 2023, 1:09pm UTC](https://forum.arduino.cc/t/bypass-serial-println-in-code/1120000/24 "2023-04-27T13:09:59Z")

</div>

this will probably help everyone understand what Im getting at. I do a lot of little projects like this and everytime i program in the buffer scrub on connect on the app side, it bothers me 😃  
again, not that it makes any difference to the end result as you can see, just feels less than artful.  
im not after debug, but similar functional premise.

[![](https://europe1.discourse-cdn.com/arduino/original/4X/a/a/d/aad7c70bdaaacdc0bb0046118953496ed83cd9c0.jpeg "A "self-Tuning" Carb in 2023? NOT fuel Injection (Beta Version - Teaser)") ](https://www.youtube.com/watch?v=d11-rNFu00Y)

---

<div class="post-metadata">

**Author:** ![noiasca](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/noiasca/32/1126910_2.png) [@noiasca](https://forum.arduino.cc/u/noiasca)\
**Post date:** [April 27, 2023, 2:03pm UTC](https://forum.arduino.cc/t/bypass-serial-println-in-code/1120000/25 "2023-04-27T14:03:10Z")

</div>

> [@Thunderhead289](#):
>
> but similar functional premise.

so the two propsals in #21 solve your functional requirement?  
If not - what are you missing?

---

<div class="post-metadata">

**Author:** ![Thunderhead289](https://avatars.discourse-cdn.com/v4/letter/t/b4bc9f/32.png) [@Thunderhead289](https://forum.arduino.cc/u/Thunderhead289)\
**Post date:** [April 27, 2023, 2:18pm UTC](https://forum.arduino.cc/t/bypass-serial-println-in-code/1120000/26 "2023-04-27T14:18:20Z")

</div>

you have the best response by far that seems potentially promising, definitely more-so along the lines of what i would consider ideal - going to play with it and check loop time and storage space usage of your way vs my simplistic way.

---

<div class="post-metadata">

**Author:** ![2112](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/2112/32/1129664_2.png) [@2112](https://forum.arduino.cc/u/2112)\
**Post date:** [April 27, 2023, 2:27pm UTC](https://forum.arduino.cc/t/bypass-serial-println-in-code/1120000/27 "2023-04-27T14:27:37Z")

</div>

I should have recognized you. You mounted a lawnmower carb on an old 289 and got some crazy gas mileage. You even 3D printed the intake manifold. Very impressive.

Man, I want you to do that for me on an old Mustang

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [October 24, 2023, 2:28pm UTC](https://forum.arduino.cc/t/bypass-serial-println-in-code/1120000/28 "2023-10-24T14:28:22Z")

</div>

Closed on October 24, 2023, 2:28pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

[Previous page](https://forum.arduino.cc/t/bypass-serial-println-in-code/1120000.md?page=1)
