# Info via seriale per Debug/Controllo

**URL:** <https://forum.arduino.cc/t/info-via-seriale-per-debug-controllo/926166>\
**Category:** Software\
**Created:** [November 17, 2021, 2:51pm UTC](https://forum.arduino.cc/t/info-via-seriale-per-debug-controllo/926166 "2021-11-17T14:51:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ORSO2001](https://avatars.discourse-cdn.com/v4/letter/o/9e8a1a/32.png) [@ORSO2001](https://forum.arduino.cc/u/ORSO2001)\
**Post date:** [November 17, 2021, 7:29pm UTC](https://forum.arduino.cc/t/info-via-seriale-per-debug-controllo/926166/3 "2021-11-17T19:29:53Z")

</div>

ciao,

come si può leggere in [QUESTO](https://forum.arduino.cc/t/utilizzo-intelligente-di-serial-print/850442) post io faccio:

```cpp
#define DEBUG 1

#if DEBUG
#define SERIALE Serial
#define ATTIVA SERIALE.begin(9600);
#define STAMPA_LN(x) SERIALE.println(F(x));
#else
#define ATTIVA
#define STAMPA_LN(x)
#endif

void setup() {
  ATTIVA
  STAMPA_LN("ciao");

}

```

quindi a parità di programma mettendo "0" od "1" su DEBUG stampi o no.

---

_[View the full topic](https://forum.arduino.cc/t/info-via-seriale-per-debug-controllo/926166)._
