I installed Arduino 1.8.12 today on my Raspberry Pi 3. I spent the day researching and making the changes suggested to get rid of the message "avrdude: usbdev_open(): cannot open device: Permission denied" for my Uno wifi rev2.
I finally thought to try my regular Arduino Uno and it works fine.
I have -
Installed the Uno wifi rev2 driver from board manager twice. I select Uno wifi rev2 as my board.
Removed the Arduino IDE and reinstalled it.
dialout is in my user (pi) group.
I tried the sudo chmod 666 ttyACM0
When the ttyACM0 did not remain as 666 I made a rule
filename = 50-myusb.rules
contains - KERNEL=="ttyACM[0-9]*", MODE="0666"
in path - /etc/udev/rules.d
Permissions for ttyACM0 is now 666.
What have I missed? What is different communicating with the Uno wifi rev2 from the orginal Uno rev3?