Upload to Arduino causes Compilererror

Hello Guys,

I’m quite new to XOD and this is my first project.
I’m using XOD V0.38 on Win10 64bit and I’m trying to make code for an Arduino UNO Wifi Rev2.
The following picture shows my Patch:

For compilation I use the following settings:
Board model: Arduino UNO Wifi Rev2
Registers emulation: NONE (ATmega4809)

When I then hit ‘Upload’, I get the following message in the Compilerfeed:

Begin compiling code for the board Arduino Uno WiFi Rev2 📦

C:\Users\prenzel\AppData\Local\Temp\xod_temp_sketchbookXq6W2d\xod_1627634143083_sketch\xod_1627634143083_sketch.ino: In member function 'void xod::xod__gpio__digital_write::Node<constant_input_PORT>::evaluate(xod::xod__gpio__digital_write::Node<constant_input_PORT>::Context)':
C:\Users\prenzel\AppData\Local\Temp\xod_temp_sketchbookXq6W2d\xod_1627634143083_sketch\xod_1627634143083_sketch.ino:2533:48: error: cannot convert 'const bool' to 'PinStatus' for argument '2' to 'void digitalWrite(pin_size_t, PinStatus)'
         ::digitalWrite(constant_input_PORT, val);

Error during build: exit status 1

I really don’t know, what I might have done wrong or what else happend, to make the code try to initialize a bool with ‘2’ (that’s what I believe to understand with my not existing knowledge).

If you need any further information or have any suggestions, please let me know.
I really like XOD so far and don’t want to change this.

Thank you and best regards.

I think it’s saying you have an issue somewhere here, though, I’m not sure why

The “ON” pin looks like it’s supposed to be boolean. And the OR puts out boolean… Flip-Flop out is also boolean.

It could be helpful to post the actual code file, so someone can dig into the MotorStarter node to see what’s going on…

Oh, and wire up some watch nodes to all the outputs in the figure I posted.

I think I might have found the issue or at least kind of a workaround:
The “Motorstarter”-node is a xod/common-hardware/relay wich I now replaced it with a xod/common-hardware/led. If that is done, the patch compiles and deploys to the board without problems.
Now I just need to get the code to work as I want it to xD

It could be helpful to post the actual code file, so someone can dig into the MotorStarter node to see what’s going on…

I tried to upload the .ino-file that contains the problem to this post but I didn’t find an option to do that.
Can you please tell me how?

Thank you for your help.
With best regards.


Use the icons in the reply box…

Hit the quotes to paste code between the makers, and it just shows up as text in code format in the reply.
Hit the upload button, and navigate to the actual XOD file or whatever file…
Copy and Paste screen shots, like what the error is saying.

When you hover over the icons, there’s a little help bubble that pops up describing what the icon does.

Also, it looks like you’re using a simulation… you may want to get an actual arduino to practice with. I tried the simulation, and didn’t have any luck. I’m always uploading to an actual board and using Debug/Watch/Tweak… Works great.

Sorry I thought you wanted the .ino-File, so I was trying to upload an .zip-archive with the .ino-file, because it seemed to need to be in a specific folder and this wasn’t supported.

But I also realized that I’m not allowed to upload any attachments, because I’m a new user.
And I don’t want to paste 2000+ lines of code in the text :sweat_smile:.

The error is the same, that I posted in the first post.

And you don’t need to worry, I already have an UNO Wifi R2, wich I’m using for testing. But compiling the patch with a relay-node doesn’t seem to work.
I wrote the Code I need already in Arduino IDE wich works and the XOD-solution with the led-node is fine too.

Thanks again for your help.
Best regards.


Well, then I’ll have to look into my crystal ball…
Try changing pins, or linking done to the UPD’s to make a data flow… Also, Could be good to wire the out of OR to the ACT of Motorstarter… I’ve never seen that motor starter node, is it standard?.. so, not much I can do by looking at a black-box. Maybe dry using a different kind of node altogether to do the motor control. Your node may be messed up or incomplete, depending on where you took it from.
I can’t help any further, unless I see a XODBALL file. Even then, I may not have the answer.

It looks like your input pin nodes are repeatedly used… Could be causing the problem. The D4 in LS_Stopp looks bad, since it’s repeated on the loop with no flow control. Link the Done to UDP’s. Try to deleted the repeated one, and just run a wire from the output of the first. Same for D7 Q1_Error. Use a BUS, if you want.

Good Luck!

I’m sorry for that.
Thanks for the tips, I’ll try them.
That Motorstarter-node is actually the xod/common-hardware/relay-node that is just labeled as “Motorstarter”. All the nodes I use are XOD-standard nodes, I just labeled them maybe :sweat_smile:
Replacing the relay-node with the led node (both common-hardware-library) works. I don’t know, if there are other output nodes I could try…

I’ll try to get a better memberrank wich allows me to upload files.

Thanks for that tip with the inputs, I’ll try that.

Thank you again for your help.
Best regards.


I just got a higher member rank, so here is the .xodball-file:
Gurtförderer_test.xodball (4.6 KB)
I changed it for testing, but the error still appears.
I hope this helps you to find my mistake.

Thank you again.

Well, your code works fine on my Uno… The only thing that can be happening is that you haven’t selected the right board on uploading…

Now, when I switch back to my Uno, it’s actually not on the right COM until I select the COM that has my board.

Now, both are selected properly.

Then, Upload.
Works great.

If you’re having issues still. Either, a) look around on the internet for issues with the board type you’re using, b) get a different board type and see what happens, c) contact the XOD developers to report a possible bug (only after you’ve done a) and b) ). If you’re using Wi-Fi… Then, if you’re not married to arduino then you may consider ESP32.

You gotta have the Packages up-to-date, too… Check out this post, they mention selecting a particular board.

Thank you for your suggestions,

I’m pretty sure that the Board and Com-Port were the right one, wit no Emulation selected.
When I pasted the generated C++ code into the Arduino-IDE, the same Error occurred (don’t know if that tells anything good or bad).

I’ll try a) and b) but it could take a time.
I don’t necessarily need Wifi, so I’ll try to get a “normal” UNO.
If I have any more questions, I’ll let you know.

Thank you for your help!

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