# UART print to the serial monitor

**URL:** <https://forum.xod.io/t/uart-print-to-the-serial-monitor/3301>\
**Category:** Uncategorized\
**Created:** [January 14, 2020, 7:22pm UTC](https://forum.xod.io/t/uart-print-to-the-serial-monitor/3301 "2020-01-14T19:22:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cedro](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@cedro](https://forum.xod.io/u/cedro)\
**Post date:** [January 14, 2020, 7:22pm UTC](https://forum.xod.io/t/uart-print-to-the-serial-monitor/3301/1 "2020-01-14T19:22:21Z")

</div>

I’m trying to get anything to print to the serial monitor. The code version works fine.

Internal XOD uploads work fine. Buttons, LED’s etc… Can’t get anything in or out of Serial.

Can anyone give me a hint? I’ve been banging on this for a while now.

 ![2020-01-14_11-15-03](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/8/80e6e165dcd7b76c9649aa0fbaf44721bc326dee.png)

---

<div class="post-metadata">

**Author:** ![cedro](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@cedro](https://forum.xod.io/u/cedro)\
**Post date:** [January 14, 2020, 7:28pm UTC](https://forum.xod.io/t/uart-print-to-the-serial-monitor/3301/2 "2020-01-14T19:28:51Z")

</div>

Example of working code…

 ![2020-01-14_11-27-16](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/b/b018d2de0aed79bea3ac1bbfe97ce315b153a654.png)

---

<div class="post-metadata">

**Author:** ![cedro](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@cedro](https://forum.xod.io/u/cedro)\
**Post date:** [January 16, 2020, 1:05am UTC](https://forum.xod.io/t/uart-print-to-the-serial-monitor/3301/3 "2020-01-16T01:05:06Z")

</div>

Now I’m just trying all the nodes. See if I can get anything Serial/UART.

Thanks for any help…

 ![2020-01-15_17-01-19](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/9/974edc391e6e54c06274aab0dfa543db119bc829.png)

Here is the upload confirmation if that helps.

```auto
Uploading compiled code to the board...

avrdude: Version 6.3-20190619

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\XX\xod\ __packages__ \packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port : COM3
         Using Programmer : arduino

         Overriding Baud Rate : 115200

         AVR Part : ATmega328P

         Chip Erase delay : 9000 us
         PAGEL : PD7
         BS2 : PC2

         RESET disposition : dedicated

         RETRY pulse : SCK
         serial program mode : yes
         parallel program mode : yes
         Timeout : 200
         StabDelay : 100

         CmdexeDelay : 25

         SyncLoops : 32

         ByteDelay : 0
         PollIndex : 3

         PollValue : 0x53
         Memory Detail :

                                  Block Poll Page Polled

           Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack

           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------

           eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff

           flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff

           lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00

           hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00

           efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00

           lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00

           calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00

           signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

         Programmer Type : Arduino

         Description : Arduino

         Hardware Version: 3

         Firmware Version: 4.4

         Vtarget : 0.3 V
         Varef : 0.3 V
         Oscillator : 28.800 kHz

         SCK period : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)

avrdude: safemode: lfuse reads as 0

avrdude: safemode: hfuse reads as 0

avrdude: safemode: efuse reads as 0

avrdude: reading input file "C:\Users\XX\AppData\Local\Temp\xod_temp_sketchbooksOOFjp\xod_1579136162634_sketch/xod_1579136162634_sketch.arduino.avr.uno.hex"

avrdude: writing flash (7158 bytes):

Writing | ################################################## | 100% 1.15s

avrdude: 7158 bytes of flash written

avrdude: verifying flash memory against C:\Users\XX\AppData\Local\Temp\xod_temp_sketchbooksOOFjp\xod_1579136162634_sketch/xod_1579136162634_sketch.arduino.avr.uno.hex:

avrdude: load data flash data from input file C:\Users\XX\AppData\Local\Temp\xod_temp_sketchbooksOOFjp\xod_1579136162634_sketch/xod_1579136162634_sketch.arduino.avr.uno.hex:

avrdude: input file C:\Users\XXAppData\Local\Temp\xod_temp_sketchbooksOOFjp\xod_1579136162634_sketch/xod_1579136162634_sketch.arduino.avr.uno.hex contains 7158 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.92s

avrdude: verifying ...
avrdude: 7158 bytes of flash verified

avrdude: safemode: lfuse reads as 0

avrdude: safemode: hfuse reads as 0

avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done. Thank you.

=== Done ===

```

---

<div class="post-metadata">

**Author:** ![cedro](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@cedro](https://forum.xod.io/u/cedro)\
**Post date:** [January 16, 2020, 8:00pm UTC](https://forum.xod.io/t/uart-print-to-the-serial-monitor/3301/4 "2020-01-16T20:00:30Z")

</div>

I can get the watch node to return data in debug mode. Still can’t see anything over serial.

 ![2020-01-16_11-57-29](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/b/bffabe6841e6ca14c4211550c9096b78b8b81aac.png)

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [January 16, 2020, 10:33pm UTC](https://forum.xod.io/t/uart-print-to-the-serial-monitor/3301/5 "2020-01-16T22:33:15Z")

</div>

To use the serial monitor or connect to another application, you must stop debugging on XOD, or load without debugging.

 ![20200116_192412](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/6/60400101e30f195c7c8bf9d6adfe3b73bc7bfcd9.jpeg)

 ![20200116_192340](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/0/0c8b1db2c7976a9b13584e7edc5596a49c03ecce.jpeg)

ps: in xod you will see it that way

![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/1/11a740997bd5dd783dd98c1cd650b086db07aff8.png)

---

<div class="post-metadata">

**Author:** ![cedro](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@cedro](https://forum.xod.io/u/cedro)\
**Post date:** [January 17, 2020, 1:32am UTC](https://forum.xod.io/t/uart-print-to-the-serial-monitor/3301/6 "2020-01-17T01:32:42Z")

</div>

Thanks for your help! Thought I tried that. Guess not.

Can you give me an idea of “write-byte” vs “print”?

I’m trying to stream out a float value. “print” looks to be for string data. Should I use that then convert the data type on the other end?

Does “write-byte” work best when transferring numerical values?

 ![2020-01-16_16-55-14](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/3/38dbecda3e015437ab4d1fa3658b222a9b0c92c7.png)

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [January 17, 2020, 5:57am UTC](https://forum.xod.io/t/uart-print-to-the-serial-monitor/3301/7 "2020-01-17T05:57:35Z")

</div>

> [@cedro](#):
>
> Does “write-byte” work best when transferring numerical values?

I think I have read that it is better, but as I commented in another post my knowledge about uart is very limited.

My way of learning is to take knowledge of what I need, until now do not do any project with uart.

Surely there is someone with more knowledge to help you, but you must be patient 🙂
