file:///C:/Users/DIcha/OneDrive/Desktop/New%20Bitmap%20Image.bmp
So i recently started looking how to make my rotary encoder to emulate a joystick x or y axis and i found this well done library with a arduino example in it but my board wont comply with it even that it is said that the program is compatible with arduino micro.
can someone help
JoystickEncoderXAxis.ino (968 Bytes)
Hi,
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Please try not to post images off Forum, it is better to attach and embed the image in your post, this is because quite a few forum users don't use PC/Laptop apps.
What model Arduino are you programming for?
Thanks.. Tom..
Please copy the text from the output window in a post. Posting pictures is a problem, posting pictures that first need image processing to sharpen them is just crap.
And if I see OneDrive, do a search. There is a solution where you can keep on using it (something with 'files on demand') or move it to a normal folder on your PC. Not sure if that's the problem though.
avr-g++: error: cannot access device-specs for 'atmega32u4' expected at 'device-specs/specs-atmega32u4'
avr-g++: note: devices natively supported: ata5272 ata5505 ata5702m322 ata5782 ata5790 ata5790n ata5791 ata5795 ata5831 ata6285 ata6286 ata6289 ata6612c ata6613c ata6614q ata6616c ata6617c ata664251 ata8210 ata8510 atmega103 atmega128 atmega128a atmega128rfa1 atmega128rfr2 atmega1280 atmega1281 atmega1284 atmega1284p atmega1284rfr2 atmega16 atmega16a atmega16hva atmega16hva2 atmega16hvb atmega16hvbrevb atmega16m1 atmega16u2 atmega16u4 atmega161 atmega162 atmega163 atmega164a atmega164p atmega164pa atmega165 atmega165a atmega165p atmega165pa atmega168 atmega168a atmega168p atmega168pa atmega168pb atmega169 atmega169a atmega169p atmega169pa atmega256rfr2 atmega2560 atmega2561 atmega2564rfr2 atmega32 atmega32a atmega32c1 atmega32hvb atmega32hvbrevb atmega32m1 atmega32u2 atmega32u4 atmega32u6 atmega323 atmega324a atmega324p atmega324pa atmega325 atmega325a atmega325p atmega325pa atmega3250 atmega3250a atmega3250p atmega3250pa atmega328 atmega328p atmega328pb atmega329 atmega329a atmega329p atmega329pa atmega3290 atmega3290a atmega3290p atmega3290pa atmega406 atmega48 atmega48a atmega48p atmega48pa atmega48pb atmega64 atmega64a atmega64c1 atmega64hve atmega64hve2 atmega64m1 atmega64rfr2 atmega640 atmega644 atmega644a atmega644p atmega644pa atmega644rfr2 atmega645 atmega645a atmega645p atmega6450 atmega6450a atmega6450p atmega649 atmega649a atmega649p atmega6490 atmega6490a atmega6490p atmega8 atmega8a atmega8hva atmega8u2 atmega8515 atmega8535 atmega88 atmega88a atmega88p atmega88pa atmega88pb attiny10 attiny11 attiny12 attiny13 attiny13a attiny15 attiny1634 attiny167 attiny20 attiny22 attiny2313 attiny2313a attiny24 attiny24a attiny25 attiny26 attiny261 attiny261a attiny28 attiny4 attiny40 attiny43u attiny4313 attiny44 attiny44a attiny441 attiny45 attiny461 attiny461a attiny48 attiny5 attiny828 attiny84 attiny84a attiny841 attiny85 attiny861 attiny861a attiny87 attiny88 attiny9 atxmega128a1 atxmega128a1u atxmega128a3 atxmega128a3u atxmega128a4u atxmega128b1 atxmega128b3 atxmega128c3 atxmega128d3 atxmega128d4 atxmega16a4 atxmega16a4u atxmega16c4 atxmega16d4 atxmega16e5 atxmega192a3 atxmega192a3u atxmega192c3 atxmega192d3 atxmega256a3 atxmega256a3b atxmega256a3bu atxmega256a3u atxmega256c3 atxmega256d3 atxmega32a4 atxmega32a4u atxmega32c3 atxmega32c4 atxmega32d3 atxmega32d4 atxmega32e5 atxmega384c3 atxmega384d3 atxmega64a1 atxmega64a1u atxmega64a3 atxmega64a3u atxmega64a4u atxmega64b1 atxmega64b3 atxmega64c3 atxmega64d3 atxmega64d4 atxmega8e5 at43usb320 at43usb355 at76c711 at86rf401 at90can128 at90can32 at90can64 at90c8534 at90pwm1 at90pwm161 at90pwm2 at90pwm2b at90pwm216 at90pwm3 at90pwm3b at90pwm316 at90pwm81 at90scr100 at90s1200 at90s2313 at90s2323 at90s2333 at90s2343 at90s4414 at90s4433 at90s4434 at90s8515 at90s8535 at90usb1286 at90usb1287 at90usb162 at90usb646 at90usb647 at90usb82 at94k m3000
avr-g++: note: supported core architectures: avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega2 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny avr1
avr-g++: note: you can provide your own specs files, see http://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html for details
exit status 1
Error compiling for board Arduino/Genuino Micro.
Invalid library found in C:\Users\DIcha\OneDrive?????????\Arduino\libraries\32-FUNCTION-BUTTON-BOX-master: C:\Users\DIcha\OneDrive?????????\Arduino\libraries\32-FUNCTION-BUTTON-BOX-master
Invalid library found in C:\Users\DIcha\OneDrive?????????\Arduino\libraries\ArduinoJoystickLibrary-master: C:\Users\DIcha\OneDrive?????????\Arduino\libraries\ArduinoJoystickLibrary-master
It says onedrive but that is my documentary part of the hard disk it is not a virtual one
Hi,
Your code needs this line added to compile for Micro ad Leonardo if you include this line;
#include <Joystick.h>
// Create Joystick
Joystick_ Joystick;
#include <Encoder.h>
You need to create the joystick.
See the Joystick Examples.
Will your IDE compile any of the Joystick Example codes?
Compiles on Win7, IDE 1.8.5
Tom...
Arduino: 1.8.5 (Windows Store 1.8.10.0) (Windows 10), Board: "Arduino/Genuino Micro"
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.10.0_x86__mdqgnx93n4wtt\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.10.0_x86__mdqgnx93n4wtt\hardware -hardware C:\Users\DIcha\OneDrive\?????????\ArduinoData\packages -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.10.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.10.0_x86__mdqgnx93n4wtt\hardware\tools\avr -tools C:\Users\DIcha\OneDrive\?????????\ArduinoData\packages -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.10.0_x86__mdqgnx93n4wtt\libraries -libraries C:\Users\DIcha\OneDrive\?????????\Arduino\libraries -fqbn=arduino:avr:micro -ide-version=10805 -build-path C:\Users\DIcha\AppData\Local\Temp\arduino_build_827361 -warnings=none -build-cache C:\Users\DIcha\AppData\Local\Temp\arduino_cache_799118 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\DIcha\OneDrive\?????????\ArduinoData\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avrdude.path=C:\Users\DIcha\OneDrive\?????????\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avr-gcc.path=C:\Users\DIcha\OneDrive\?????????\ArduinoData\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Users\DIcha\OneDrive\Desktop\JoystickEncoderXAxis\JoystickEncoderXAxis.ino
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.10.0_x86__mdqgnx93n4wtt\arduino-builder -compile -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.10.0_x86__mdqgnx93n4wtt\hardware -hardware C:\Users\DIcha\OneDrive\?????????\ArduinoData\packages -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.10.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.10.0_x86__mdqgnx93n4wtt\hardware\tools\avr -tools C:\Users\DIcha\OneDrive\?????????\ArduinoData\packages -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.10.0_x86__mdqgnx93n4wtt\libraries -libraries C:\Users\DIcha\OneDrive\?????????\Arduino\libraries -fqbn=arduino:avr:micro -ide-version=10805 -build-path C:\Users\DIcha\AppData\Local\Temp\arduino_build_827361 -warnings=none -build-cache C:\Users\DIcha\AppData\Local\Temp\arduino_cache_799118 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\DIcha\OneDrive\?????????\ArduinoData\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avrdude.path=C:\Users\DIcha\OneDrive\?????????\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avr-gcc.path=C:\Users\DIcha\OneDrive\?????????\ArduinoData\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Users\DIcha\OneDrive\Desktop\JoystickEncoderXAxis\JoystickEncoderXAxis.ino
Using board 'micro' from platform in folder: C:\Users\DIcha\OneDrive\?????????\ArduinoData\packages\arduino\hardware\avr\1.6.21
Using core 'arduino' from platform in folder: C:\Users\DIcha\OneDrive\?????????\ArduinoData\packages\arduino\hardware\avr\1.6.21
Detecting libraries used...
"C:\Users\DIcha\OneDrive\Документи\ArduinoData\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Micro"' "-IC:\Users\DIcha\OneDrive\Документи\ArduinoData\packages\arduino\hardware\avr\1.6.21\cores\arduino" "-IC:\Users\DIcha\OneDrive\Документи\ArduinoData\packages\arduino\hardware\avr\1.6.21\variants\micro" "C:\Users\DIcha\AppData\Local\Temp\arduino_build_827361\sketch\JoystickEncoderXAxis.ino.cpp" -o "nul"
"C:\Users\DIcha\OneDrive\Документи\ArduinoData\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Micro"' "-IC:\Users\DIcha\OneDrive\Документи\ArduinoData\packages\arduino\hardware\avr\1.6.21\cores\arduino" "-IC:\Users\DIcha\OneDrive\Документи\ArduinoData\packages\arduino\hardware\avr\1.6.21\variants\micro" "C:\Users\DIcha\AppData\Local\Temp\arduino_build_827361\sketch\Encoder.cpp" -o "nul"
Generating function prototypes...
"C:\Users\DIcha\OneDrive\Документи\ArduinoData\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Micro"' "-IC:\Users\DIcha\OneDrive\Документи\ArduinoData\packages\arduino\hardware\avr\1.6.21\cores\arduino" "-IC:\Users\DIcha\OneDrive\Документи\ArduinoData\packages\arduino\hardware\avr\1.6.21\variants\micro" "C:\Users\DIcha\AppData\Local\Temp\arduino_build_827361\sketch\JoystickEncoderXAxis.ino.cpp" -o "C:\Users\DIcha\AppData\Local\Temp\arduino_build_827361\preproc\ctags_target_for_gcc_minus_e.cpp"
avr-g++: error: cannot access device-specs for 'atmega32u4' expected at 'device-specs/specs-atmega32u4'
avr-g++: note: you can provide your own specs files, see <http://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html> for details
exit status 1
Error compiling for board Arduino/Genuino Micro.
Invalid library found in C:\Users\DIcha\OneDrive\?????????\Arduino\libraries\32-FUNCTION-BUTTON-BOX-master: C:\Users\DIcha\OneDrive\?????????\Arduino\libraries\32-FUNCTION-BUTTON-BOX-master
Invalid library found in C:\Users\DIcha\OneDrive\?????????\Arduino\libraries\ArduinoJoystickLibrary-master: C:\Users\DIcha\OneDrive\?????????\Arduino\libraries\ArduinoJoystickLibrary-master
pert
June 2, 2018, 1:28pm
8
I believe sterretje is right about OneDrive being the culprit.
The easiest solution is to not use the Arduino IDE with any files in OneDrive.
In this case that's a little tricky because the Windows App Store version of the Arduino IDE is storing
files under C:\Users\DIcha\OneDrive\Ð"окументи\ArduinoData. You can avoid this by using either the "Windows ZIP file for non admin install" or "Windows Installer, for Windows XP and up" downloads from https://www.arduino.cc/en/Main/Software instead of the Windows App Store version of the Arduino IDE.
You also need to change the location of the sketchbook folder via the Arduino IDE's File > Preferences > Sketchbook Location . Change that setting to any convenient folder on your computer as long as it's not in the OneDrive. The Arduino IDE does not automatically copy the contents of the previous sketchbook folder to the new location so you will need to do this manually.
If you do want to continue using the Arduino IDE with OneDrive, you may be interested to know that the bug has already been fixed in the beta build of the Arduino IDE, which you can download here:
but be aware that version of the Arduino IDE is primarily intended only for beta testing so you may have a higher chance of encountering bugs than you would using the production releases of the IDE.
To see details on the problem, steps that are being taken to fix it, and other possible workarounds that will allow you use the Arduino IDE with OneDrive, see:
opened 03:11PM - 16 Nov 17 UTC
closed 09:12AM - 28 Aug 18 UTC
type: imperfection
os: windows
topic: code
It seems recent Windows 10 versions combined with OneDrive suffer from arduino-b… uilder not being able to read files. This is reported as arduino/Arduino#6867 and arduino/Arduino#6932. The symptoms are similar as #90, but I think the underlying issue is similar but different, so I'm opening a new issue.
arduino/Arduino#6932 contains the error output:
```
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"
C:\Apps\arduino-latest\arduino-builder -dump-prefs -logger=machine -hardware C:\Apps\arduino-latest\hardware -hardware C:\Users\HaMac\AppData\Local\Arduino15\packages -hardware C:\Users\HaMac\OneDrive\Documents\Ardunio\hardware -tools C:\Apps\arduino-latest\tools-builder -tools C:\Apps\arduino-latest\hardware\tools\avr -tools C:\Users\HaMac\AppData\Local\Arduino15\packages -built-in-libraries C:\Apps\arduino-latest\libraries -libraries C:\Users\HaMac\OneDrive\Documents\Ardunio\libraries -fqbn=arduino:avr:uno -ide-version=10805 -build-path C:\Users\HaMac\AppData\Local\Temp\arduino_build_721501 -warnings=default -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\HaMac\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avrdude.path=C:\Users\HaMac\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avr-gcc.path=C:\Users\HaMac\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Users\HaMac\OneDrive\Documents\Ardunio\BlinkTwoLEDs\BlinkTwoLEDs.ino
readlink C:\Users\HaMac\OneDrive\Documents\Ardunio\BlinkTwoLEDs\BlinkTwoLEDs.ino: The system cannot find the file specified.
Error compiling for board Arduino/Genuino Uno.
```
The reporter has tested a number of versions, and has found that 1.6.5 works, but 1.6.6 breaks things, on this particular system. The latter version is the one introducing arduino-builder.
One difference here, is that the .ino file seems to be a link (or some other special file), not the directory.
@phil85521 @ngmacha, could either of you get some more info on the .ino file that is failing? E.g. look at its properties or use some other Windows tool to figure out what kind of file it is, whether it is indeed a junction or some other kind of special file? I don't have any specific ideas what to do, not being a Windows-user.
Looking at the go code previously patched (https://github.com/golang/go/commit/571738569e9b6bb30ebceaf2eb5936f6ee254e34#diff-495e6a9c70ec790e4be07ee30c55141f) it seems that this file might be (or have?) some kind of "reparse point" that is not a symlink or junction (which are the supported types). This [post](https://stackoverflow.com/questions/47264992/one-drive-as-reparse-point) suggests that OneDrive uses the "Cloud" reparse tag (`IO_REPARSE_TAG_CLOUD_7`), which golang does not seem to explicitly support (in its [master branch](https://github.com/golang/go/blob/master/src/syscall/syscall_windows.go#L1022-L1055)).
I suspect this is something to fix at the golang end, it seems there is already a related issue open at https://github.com/golang/go/issues/22579 (which I'll provide with some extra info next).
TNX guys it was that i used the app from the store