"pulse on change"/uart print question

Sorry for the noob question, but here goes:
I read analog in. I then want to send that value via the “uart print” node. I only want to send on a change, so it’s not constantly sending.

I i get analog out, I then connect that to “pulse on change”. And then connect that to “send” on the uart print node.
The problem is that those 2 data types dont work together. Whenever I run and debug this, the “Print” node turns red and doesnt send any more.
What can I do? I have tried using a buffer node and comparing the 2 numbers and then doing a pulse on not true (the compare) but that makes my whole system unstable for some reason. Thanks

Please send a sample of your patch so we can see what’s wrong.

pulse-on-change output pin and xod/uart/print-SEND pin are both type pulse, so they can be connected. You should be able to use something like this:


The value you want is sent to DATA pin. When that value changes, a pulse is sent to the SEND pin.

Thanks for getting back to me :slight_smile:
What you are suggesting is actually what i’m doing.

If I do this:


The watch nodes just stick on “watch” and nothing ever changes. If I delete the uart nodes, everything starts to count correctly. It’s as if adding uart just destroys everything. I’m using an arduino micro.
Thanks!

I tried with usb-uart node instead, but that gives me an error on upload. Don’t understand why, since it’s an arduino micro which should be able to do this.

(post deleted by author)

Got it solved by using uart 1 :slight_smile: (though uart-usb doesnt work. I have made a seperate thread for that, because I really need to use that).

Yeah…debug is probably using uart, so you can’t have uart node and use debug for watch nodes.