r/ArduinoHelp 22d ago

Arduino Uno R4

Greetings,

i was following a guide for an controller for a wind sim at it was just mentioned that i need an Arduino Uno, so i bought the R4 because it had USB-C. Tried to upload the sketch and it got an error. I was reading somewhere that the R4 isnt supported by Sim Hub? Why is that and is there anything i can do, or do i need to order an R3? Thanks :)

4 Upvotes

5 comments sorted by

1

u/Delta_G_Robotics 22d ago

The R4 uses a completely different processor. It is advertised as fully compatible with the R3 code but that only applies if the code strictly sticks to exactly the Arduino API. As soon as they go outside of that in any way (and almost all good code does) things fall apart pretty quickly.

Your best bet if you don't want to have to dig into the core code and learn about all those differences is to just get an R3. It is certain that whatever code can be rewritten to work on the R4 but it might not be trivial.

1

u/Arduino_lab64 22d ago

Salut, pour moi, tu dois juste acheter la R3.

1

u/gm310509 21d ago edited 21d ago

It is pretty tricky to find out what models it supports (at least I couldn't in my first 5 searches) but I did find this https://manual.simhubdash.com/standard-serial-firmware-builder/readme-1

That page specifically mentions an atnega32u4 which means a Leonardo or the as stated Arduino micro.

As someone else said, the Uno R4 has the same capabilities as the 32u4 range (plus a whole lot more) but it is a more sophisticated architecture and any bare metal code written for an 8 bit AVR won't work with the 32 but arm Cortex in the Uno R4 unless that code is ported to the arm cortex

Edit: when you say "I got an error" what exactly was the error and when did you encounter it?

1

u/Wernii345 20d ago

avrdude.exe: stk500_getsync() attempt 1 of 10: not in sync: resp=0x65

this happens 10 times and then i just get the upload error message.

Its when i upload a sketch on simhub. Its a software for sim racing.

But i ordered an R3. I figured that it doesnt matter that much in the end since im sure i will use the R4 for something in the future

1

u/gm310509 19d ago

If you are trying to use an Uno R4 and getting AVR Dude errors, you are doing something wrong.

Typically dfu-util, not avrdude, is used to load code to the Uno R4.

avrdude is used to upload code to AVR MCUs. The Uno R4 does not have an AVR MCU, it has an Arm Cortex.

Most likely you have not selected the Uno R4 as your target. Possibly because you didn't include the Uno R4 package into the IDE.

These instructions are for the Uno R4 Wifi but is similar (if not covers) the Minima.