Arduino IDE 1-8.12, Linux and Uno wifi

I just installed the 1-8.12 IDE on my linux mint system to use with my new Uno wifi board. Working through the 'getting started' instructions, when I go to the board specific instructions for uno wifi I find:

Users with Linux need to run this code in the terminal: ~/.arduino15/packages/arduino/hardware/megaavr/1.8.1/scripts/create_dfu_udev_rule

However, the script won't run because there is no 'packages' directory under my ~/.arduino15 folder. Is the packages folder (and hence the creat_dfu_duev_rule script) no longer needed with 1-8.12 or did the setup script fail to create it?

Attached is a listing of the contents of the .arduino15 directory as created by the setup script.

Screenshot from 2020-04-09 14-21-32.png

The instructions are missing a step. Do this:

  • Tools > Board > Boards Manager
  • Wait for the downloads to finish.
  • From the list of available boards packages, click on "Arduino megaAVR Boards".
  • Click the "Install" button.
  • Wait for the installation to finish.
  • Click the "Close" button.

You can then run the ~/.arduino15/packages/arduino/hardware/megaavr/1.8.1/scripts/create_dfu_udev_rule command from the terminal.

Thanks, that fixed the first problem. I will follow up with the 2nd problem I ran into on this thread since it is still a linux/Uno Wifi Rev. 2 ide issue. I finally solved the problem, but the solution seems like it just worked around a bug, so I would like to post my experience. I got as far as starting to test the wifi connectivity and was able to connect to my network. I then disconnected my arduino, added a SparkFun qwiic hat connected to their TEMP102 sensor, added appropriate libs, tried to run their sample program. Program claimed it couldn't see the temperature chip. To see whether it was a cabling or temp chip issue I connected the temp chip to a Sparkfun Redboard arduino-alike, changed the board type and serial port, uploaded the temperature sample program to the Redboard and it worked like a charm. I then reconnected the Arduino Uno Wifi Rev 2, set the board back type back to Uno Wifi Rev 2 and reset serial port, but was no longer able to upload programs to the board - even the Blink example program. Instead, I got the error message that the IDE couldn't contact the loader on the board and timed out after 10 tries to sync. I then tried using the web version of the IDE and it was able to upload to the Arduino Wifi Rev. 2 with no problems. I tried a bunch of the plethora of potential fixes suggested on the internet, including uninstalling/reinstalling the IDE, to no avail.

What finally fixed the problem was uninstalling the IDE, the removing the directory it had been installed in and removing the ~/.arduino15 folder, rebooting and reinstalling the IDE. I believe it was the deletion of the ~/.arduino15 directory and allowing it to be recreated (particularly the preferences.txt file) that solved the problem since previous uninstall/reinstall/reboot hadn't fixed the problem. I suggest that adding deletion or renaming of this directory to the uninstall.sh process would be a Good Idea. Better yet would be determining what poison pill was added to the preferences.txt file by changing the board type to Uno for the Redboard and then back to Uno Wifi Rev.2 and fixing that problem. For now I'm just going to avoid using the same IDE to work on more than one board type.

I'm glad to hear it's working for you now.

It's hard to determine the cause of the upload problem without more information, which you probably can't provide since the problem has gone away. It could have been caused by selecting the wrong board from the Tools > Board menu, or selecting the wrong port from the Tools > Port menu.

paleogeek:
added a SparkFun qwiic hat connected to their TEMP102 sensor, added appropriate libs, tried to run their sample program. Program claimed it couldn't see the temperature chip.

Are you still having that problem when you use the sensor with your Uno WiFi Rev2?

I am positive I had the correct board & ports selected, double-checked that, and you're right, I am in no hurry to try to replicate the problem by using the IDE to program the Redboard again and see if it causes the upload problem for the Uno WiFi to return since I am not absolutely sure which of the dozen things I tried to fix the problem actually contributed to the fix. I have several other desktops/laptops I can use for a separate environment to program the RedBoard.

The problem not seeing the temp chip is due to a previously reported problem - I found another forum post that says the Uno Wifi Rev 2 is incompatible with the SparkFun qwiic hat. If I take off the qwiic hat and wire the arduino up to the i2c pins directly it works.

Thanks