Button works opposit

Hello

When i upload the button code with de Arduino Ide
Its working correct.
But when i upload that with Xod IT works the other way around .
Output is on when button unpressed and off when button is pressed.
What is going wrong?
The input is connected well.
And i used the example from Xod.

Ton

Hello and welcome?

What button component do you use? Can you provide the exact patch you use and a photo/schematics of your circuit?

Hello i use this patch
https://xod.io/docs/tutorial/15-buttons/
And this wiring
https://www.arduino.cc/en/Tutorial/Button
And dont worry i use a make button no break
The wiring is correct because this i my work.

Greetings
Ton

The scheme you use pulls the button down to ground and XOD expects a pull up to Vcc. That’s the difference leading to the inversion. Look carefully: what the signal will be when the button is released? It will go to ground through the resistor on your scheme:

button_schem

And it goes to 5V in the scheme recommended in the tutorial:

Use the wiring scheme from the XOD tutorial or place a xod/core/not node below the button output.

1 Like

Ok my mistake
Thanks for your reply :+1:

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