Adafruit itsybitsy 32u4, arduino compile error

Hi al,
I have an Adafruit itsybitsy 32u4 and want to flash a program controlling stepper speeds.
This program compiled ok a few months ago, now it seems there is a spanner in the works.
I can try whatever I want (reinstalling Arduino IDE, checking libraries etc.) but to no avail.

Below is the compiler error message


C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Papa\Documents\Arduino\libraries -fqbn=arduino:avr:yun -vid-pid=239A_800E -ide-version=10815 -build-path C:\Users\Papa\AppData\Local\Temp\arduino_build_681867 -warnings=none -build-cache C:\Users\Papa\AppData\Local\Temp\arduino_cache_845810 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Papa\Documents\Arduino\libraries -fqbn=arduino:avr:yun -vid-pid=239A_800E -ide-version=10815 -build-path C:\Users\Papa\AppData\Local\Temp\arduino_build_681867 -warnings=none -build-cache C:\Users\Papa\AppData\Local\Temp\arduino_cache_845810 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino

Using board 'yun' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr

Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr

Detecting libraries used...

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "C:\\Users\\Papa\\AppData\\Local\\Temp\\arduino_build_681867\\sketch\\Controller.ino.cpp" -o nul

Alternatives for Adafruit_SSD1306.h: [Adafruit_SSD1306@2.4.6]

ResolveLibrary(Adafruit_SSD1306.h)

  -> candidates: [Adafruit_SSD1306@2.4.6]

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "C:\\Users\\Papa\\AppData\\Local\\Temp\\arduino_build_681867\\sketch\\Controller.ino.cpp" -o nul

Alternatives for Adafruit_GFX.h: [Adafruit_GFX_Library@1.10.10]

ResolveLibrary(Adafruit_GFX.h)

  -> candidates: [Adafruit_GFX_Library@1.10.10]

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "C:\\Users\\Papa\\AppData\\Local\\Temp\\arduino_build_681867\\sketch\\Controller.ino.cpp" -o nul

Alternatives for SPI.h: [SPI@1.0]

ResolveLibrary(SPI.h)

  -> candidates: [SPI@1.0]

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "C:\\Users\\Papa\\AppData\\Local\\Temp\\arduino_build_681867\\sketch\\Controller.ino.cpp" -o nul

Alternatives for Wire.h: [Wire@1.0]

ResolveLibrary(Wire.h)

  -> candidates: [Wire@1.0]

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\Papa\\AppData\\Local\\Temp\\arduino_build_681867\\sketch\\Controller.ino.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306\\Adafruit_SSD1306.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library\\Adafruit_GFX.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library\\Adafruit_GrayOLED.cpp" -o nul

Alternatives for Adafruit_I2CDevice.h: [Adafruit_BusIO@1.8.1]

ResolveLibrary(Adafruit_I2CDevice.h)

  -> candidates: [Adafruit_BusIO@1.8.1]

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "C:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library\\Adafruit_GrayOLED.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "C:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library\\Adafruit_SPITFT.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "C:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library\\glcdfont.c" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "C:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src\\SPI.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "C:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src\\Wire.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "C:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src\\utility\\twi.c" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "C:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_BusIO\\Adafruit_BusIO_Register.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "C:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_BusIO\\Adafruit_I2CDevice.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "C:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_BusIO\\Adafruit_SPIDevice.cpp" -o nul

Generating function prototypes...

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "C:\\Users\\Papa\\AppData\\Local\\Temp\\arduino_build_681867\\sketch\\Controller.ino.cpp" -o "C:\\Users\\Papa\\AppData\\Local\\Temp\\arduino_build_681867\\preproc\\ctags_target_for_gcc_minus_e.cpp"

"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Papa\\AppData\\Local\\Temp\\arduino_build_681867\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Sketch wird kompiliert...

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_YUN -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8041 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Yun\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\yun" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Papa\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "C:\\Users\\Papa\\AppData\\Local\\Temp\\arduino_build_681867\\sketch\\Controller.ino.cpp" -o "C:\\Users\\Papa\\AppData\\Local\\Temp\\arduino_build_681867\\sketch\\Controller.ino.cpp.o"

Controller-38400-LEDinvert:42:25: error: redefinition of 'Adafruit_SSD1306 display'

 Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire);

                         ^

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:45:18: note: 'Adafruit_SSD1306 display' previously declared here

 Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire);

                  ^~~~~~~

Controller-38400-LEDinvert:44:5: error: redefinition of 'int readX'

 int readX;

     ^~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:47:5: note: 'int readX' previously declared here

 int readX;

     ^~~~~

Controller-38400-LEDinvert:45:5: error: redefinition of 'int readY'

 int readY;

     ^~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:48:5: note: 'int readY' previously declared here

 int readY;

     ^~~~~

Controller-38400-LEDinvert:46:5: error: redefinition of 'int readC'

 int readC;

     ^~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:49:5: note: 'int readC' previously declared here

 int readC;

     ^~~~~

Controller-38400-LEDinvert:47:5: error: redefinition of 'int readZ'

 int readZ;

     ^~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:50:5: note: 'int readZ' previously declared here

 int readZ;

     ^~~~~

Controller-38400-LEDinvert:48:5: error: redefinition of 'int readR'

 int readR;

     ^~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:51:5: note: 'int readR' previously declared here

 int readR;

     ^~~~~

Controller-38400-LEDinvert:49:5: error: redefinition of 'int readT'

 int readT;

     ^~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:52:5: note: 'int readT' previously declared here

 int readT;

     ^~~~~

Controller-38400-LEDinvert:50:5: error: redefinition of 'int readL'

 int readL;

     ^~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:53:5: note: 'int readL' previously declared here

 int readL;

     ^~~~~

Controller-38400-LEDinvert:52:5: error: redefinition of 'int readXlast'

 int readXlast = 0;

     ^~~~~~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:55:5: note: 'int readXlast' previously defined here

 int readXlast = 0;

     ^~~~~~~~~

Controller-38400-LEDinvert:53:5: error: redefinition of 'int readYlast'

 int readYlast = 0;

     ^~~~~~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:56:5: note: 'int readYlast' previously defined here

 int readYlast = 0;

     ^~~~~~~~~

Controller-38400-LEDinvert:54:5: error: redefinition of 'int readClast'

 int readClast = 0;

     ^~~~~~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:57:5: note: 'int readClast' previously defined here

 int readClast = 0;

     ^~~~~~~~~

Controller-38400-LEDinvert:55:5: error: redefinition of 'int readZlast'

 int readZlast = 0;

     ^~~~~~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:58:5: note: 'int readZlast' previously defined here

 int readZlast = 0;

     ^~~~~~~~~

Controller-38400-LEDinvert:56:5: error: redefinition of 'int readRlast'

 int readRlast = 0;

     ^~~~~~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:59:5: note: 'int readRlast' previously defined here

 int readRlast = 0;

     ^~~~~~~~~

Controller-38400-LEDinvert:57:5: error: redefinition of 'int readTlast'

 int readTlast = 0;

     ^~~~~~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:60:5: note: 'int readTlast' previously defined here

 int readTlast = 0;

     ^~~~~~~~~

Controller-38400-LEDinvert:58:5: error: redefinition of 'int readLlast'

 int readLlast = 0;

     ^~~~~~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:61:5: note: 'int readLlast' previously defined here

 int readLlast = 0;

     ^~~~~~~~~

Controller-38400-LEDinvert:60:8: error: redefinition of 'String stepper'

 String stepper;

        ^~~~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:63:8: note: 'String stepper' previously declared here

 String stepper;

        ^~~~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller-38400-LEDinvert.ino: In function 'void setup()':

Controller-38400-LEDinvert:62:6: error: redefinition of 'void setup()'

 void setup() {

      ^~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:65:6: note: 'void setup()' previously defined here

 void setup() {

      ^~~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller-38400-LEDinvert.ino: In function 'void loop()':

Controller-38400-LEDinvert:102:6: error: redefinition of 'void loop()'

 void loop() {

      ^~~~

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:105:6: note: 'void loop()' previously defined here

 void loop() {

      ^~~~

Bibliothek Adafruit_SSD1306 in Version 2.4.6 im Ordner: C:\Users\Papa\Documents\Arduino\libraries\Adafruit_SSD1306  wird verwendet

Bibliothek Adafruit_GFX_Library in Version 1.10.10 im Ordner: C:\Users\Papa\Documents\Arduino\libraries\Adafruit_GFX_Library  wird verwendet

Bibliothek SPI in Version 1.0 im Ordner: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI  wird verwendet

Bibliothek Wire in Version 1.0 im Ordner: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire  wird verwendet

Bibliothek Adafruit_BusIO in Version 1.8.1 im Ordner: C:\Users\Papa\Documents\Arduino\libraries\Adafruit_BusIO  wird verwendet

exit status 1

redefinition of 'Adafruit_SSD1306 display'

And here is the program

#include <Adafruit_SSD1306.h>
#include <splash.h>

/* This code sends data via UART from one Arduino board (controller) to another (MainBoard) to control the stepper motors and the LED illumination
 * Arduino sends the data only if there is a change in the value of the joysticks or the LED potentiometer 
 * Therefore, there is no continuous data communication between the mainboard and the controller
 * Arduino board: Adafruit ItsyBitsy 32u4 5V  
 */

#include <Wire.h> // needed for the I2C communication of the OLED, already installed in Arduino IDE
#include <Adafruit_GFX.h> // needed for the OLED // Copyright (c) 2012 Adafruit Industries.  All rights reserved.
#include <Adafruit_SSD1306.h> // needed for the OLED // Copyright (c) 2012 Adafruit Industries.  All rights reserved.

// Arduiono pins for the joysticks
#define joystickX A0
#define joystickY A1
#define joystickC A3
#define joystickZ A2
#define joystickR A5
#define joystickT A4

// potentiometer for the LED intensity
#define potLED 8


// change these values to set the direction of the movement with respect to the joystick
// the direction can also be changed by simply rotating the motor 180-deg 

#define directionX -1
#define directionY 1
#define directionZ 1
#define directionC 1
#define directionR -1
#define directionT 1

// the joystick has a variable speed control at 3 predefined speeds
// change these values to change the speed of the motor

#define fast 500
#define medium 50
#define slow 10

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 32 // OLED display height, in pixels
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire);

int readX;
int readY;
int readC;
int readZ;
int readR;
int readT;
int readL;

int readXlast = 0;
int readYlast = 0;
int readClast = 0;
int readZlast = 0;
int readRlast = 0;
int readTlast = 0;
int readLlast = 0;

String stepper;

void setup() {

  display.begin(SSD1306_SWITCHCAPVCC, 0x3c); //initialize the display
  Serial1.begin(57600); //start the serial communication, Serial1: UART

  pinMode(joystickX, INPUT);
  pinMode(joystickY, INPUT);
  pinMode(joystickZ, INPUT);
  pinMode(joystickC, INPUT);
  pinMode(joystickR, INPUT);
  pinMode(joystickT, INPUT);
  pinMode(potLED, INPUT);

// show a start-up text on the OLED display

  display.clearDisplay();
  display.setRotation(2);
  display.setTextColor(WHITE);
  display.setCursor(0, 10);
  display.setTextSize(2);
  display.println("Welcome!");
  display.display();

  delay(2000); //optional delay for the start-up message

// set the LED illumination to the potentiometer value at the start-up

  readLlast = map((analogRead(potLED)), 0, 1023, 0, 20); // map to 20 steps (5% steps) 
  Serial1.print(readL); Serial1.print("L"); Serial1.print(","); // send the data to the MainBoard to update the LED intensity
  
// show the LED intensity on the OLED display

  display.clearDisplay();
  display.setCursor(0, 10);
  display.setTextSize(2);
  display.print("LED:"); display.print(100 - (readLlast * 5)); display.print("%"); // PWM of the LED driver used in the prototype works in the opposite direction
  display.display();

}

void loop() {

  readX = map((analogRead(joystickX)), 0, 1023, -3, 3); // map the measured value to 3 positive and 3 negative speed values
  if ((readX != readXlast) ) { //check if it has changed
    if (readX == -3) {
      Serial1.print(fast * -1 * directionX); Serial1.print("X"); Serial1.print(",");
      readXlast = readX;
    }
    if (readX == -2)  {
      Serial1.print(medium * -1 * directionX); Serial1.print("X"); Serial1.print(",");
      readXlast = readX;
    }
    if (readX == -1)  {
      Serial1.print(slow * -1 * directionX); Serial1.print("X"); Serial1.print(",");
      readXlast = readX;
    }
    if (readX == 0) {
      Serial1.print(0); Serial1.print("O"); Serial1.print(","); //stop the stepper motor by sending "0O,"
      readXlast = readX;
    }
    if (readX == 1)  {
      Serial1.print(slow * directionX); Serial1.print("X"); Serial1.print(",");
      readXlast = readX;
    }

    if (readX == 2)  {
      Serial1.print(medium * directionX); Serial1.print("X"); Serial1.print(",");
      readXlast = readX;
    }

    if (readX == 3)  {
      Serial1.print(fast * directionX); Serial1.print("X"); Serial1.print(",");
      readXlast = readX;
    }

  }

// REPEAT THE SAME FOR ALL OTHER JOYSTICK POTENTIOMETERS 

  readY = map((analogRead(joystickY)), 0, 1023, -3, 3);
  if (readY != readYlast) {
    if (readY == -3)  {
      Serial1.print(fast * -1 * directionY); Serial1.print("Y"); Serial1.print(",");
      readYlast = readY;
    }
    if (readY == -2)  {
      Serial1.print(medium * -1 * directionY); Serial1.print("Y"); Serial1.print(",");
      readYlast = readY;
    }
    if (readY == -1)  {
      Serial1.print(slow * -1 * directionY); Serial1.print("Y"); Serial1.print(",");
      readYlast = readY;
    }
    if (readY == 0) {
      Serial1.print(0); Serial1.print("O"); Serial1.print(",");
      readYlast = readY;
    }
    if (readY == 1)  {
      Serial1.print(slow * directionY); Serial1.print("Y"); Serial1.print(",");
      readYlast = readY;
    }

    if (readY == 2)  {
      Serial1.print(medium * directionY); Serial1.print("Y"); Serial1.print(",");
      readYlast = readY;
    }

    if (readY == 3)  {
      Serial1.print(fast * directionY); Serial1.print("Y"); Serial1.print(",");
      readYlast = readY;
    }

  }

  readC = map((analogRead(joystickC)), 0, 1023, -3, 3);
  if (readC != readClast) {
    if (readC == -3)  {
      Serial1.print(fast * -1 * directionC); Serial1.print("C"); Serial1.print(",");
      readClast = readC;
    }
    if (readC == -2)  {
      Serial1.print(medium * -1 * directionC); Serial1.print("C"); Serial1.print(",");
      readClast = readC;
    }
    if (readC == -1) {
      Serial1.print(slow * -1 * directionC); Serial1.print("C"); Serial1.print(",");
      readClast = readC;
    }
    if (readC == 0)  {
      Serial1.print(0); Serial1.print("O"); Serial1.print(",");
      readClast = readC;
    }
    if (readC == 1)  {
      Serial1.print(slow * directionC); Serial1.print("C"); Serial1.print(",");
      readClast = readC;
    }

    if (readC == 2)  {
      Serial1.print(medium * directionC); Serial1.print("C"); Serial1.print(",");
      readClast = readC;
    }

    if (readC == 3) {
      Serial1.print(fast * directionC); Serial1.print("C"); Serial1.print(",");
      readClast = readC;
    }

  }

  readZ = map((analogRead(joystickZ)), 0, 1023, -3, 3);
  if (readZ != readZlast) {
    if (readZ == -3)  {
      Serial1.print(fast * -1 * directionZ); Serial1.print("Z"); Serial1.print(",");
      readZlast = readZ;
    }
    if (readZ == -2)  {
      Serial1.print(medium * -1 * directionZ); Serial1.print("Z"); Serial1.print(",");
      readZlast = readZ;
    }
    if (readZ == -1)  {
      Serial1.print(slow * -1 * directionZ); Serial1.print("Z"); Serial1.print(",");
      readZlast = readZ;
    }
    if (readZ == 0) {
      Serial1.print(0); Serial1.print("O"); Serial1.print(",");
      readZlast = readZ;
    }
    if (readZ == 1) {
      Serial1.print(slow * directionZ); Serial1.print("Z"); Serial1.print(",");
      readZlast = readZ;
    }

    if (readZ == 2)  {
      Serial1.print(medium * directionZ); Serial1.print("Z"); Serial1.print(",");
      readZlast = readZ;
    }

    if (readZ == 3)  {
      Serial1.print(fast * directionZ); Serial1.print("Z"); Serial1.print(",");
      readZlast = readZ;
    }

  }

  readR = map((analogRead(joystickR)), 0, 1023, -3, 3);
  if (readR != readRlast)  {
    if (readR == -3) {
      Serial1.print(fast * -1 * directionR); Serial1.print("R"); Serial1.print(",");
      readRlast = readR;
    }
    if (readR == -2) {
      Serial1.print(medium * -1 * directionR); Serial1.print("R"); Serial1.print(",");
      readRlast = readR;
    }
    if (readR == -1)  {
      Serial1.print(slow * -1 * directionR); Serial1.print("R"); Serial1.print(",");
      readRlast = readR;
    }
    if (readR == 0) {
      Serial1.print(0); Serial1.print("O"); Serial1.print(",");
      readRlast = readR;
    }
    if (readR == 1)  {
      Serial1.print(slow * directionR); Serial1.print("R"); Serial1.print(",");
      readRlast = readR;
    }

    if (readR == 2)  {
      Serial1.print(medium * directionR); Serial1.print("R"); Serial1.print(",");
      readRlast = readR;
    }

    if (readR == 3) {
      Serial1.print(fast * directionR); Serial1.print("R"); Serial1.print(",");
      readRlast = readR;
    }

  }

  readT = map((analogRead(joystickT)), 0, 1023, -3, 3);
  if (readT != readTlast)  {
    if (readT == -3) {
      Serial1.print(fast * -1 * directionT); Serial1.print("T"); Serial1.print(",");
      readTlast = readT;
    }
    if (readT == -2) {
      Serial1.print(medium * -1 * directionT); Serial1.print("T"); Serial1.print(",");
      readTlast = readT;
    }
    if (readT == -1) {
      Serial1.print(slow * -1 * directionT); Serial1.print("T"); Serial1.print(",");
      readTlast = readT;
    }
    if (readT == 0)  {
      Serial1.print(0); Serial1.print("O"); Serial1.print(",");
      readTlast = readT;
    }
    if (readT == 1)  {
      Serial1.print(slow * directionT); Serial1.print("T"); Serial1.print(",");
      readTlast = readT;
    }

    if (readT == 2)  {
      Serial1.print(medium * directionT); Serial1.print("T"); Serial1.print(",");
      readTlast = readT;
    }

    if (readT == 3)  {
      Serial1.print(fast * directionT); Serial1.print("T"); Serial1.print(",");
      readTlast = readT;
    }

  }

// LED INTENSITY

  readL = map((analogRead(potLED)), 0, 1023, 0, 20);
  if (readL != readLlast) {
    Serial1.print(readL); Serial1.print("L"); Serial1.print(",");
    display.clearDisplay();
    display.setCursor(0, 10);
    display.setTextSize(2);
    display.print("LED:"); display.print(100 - (readL * 5)); display.print("%");
    display.display();
    readLlast = readL;
  }

}


Every help is much appreciated.

Peter

It looks like you have two copies of your program in the sketch folder.

One is named "Controller.ino":

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller.ino:105:6: note: 'void loop()' previously defined here

and the other named "Controller-38400-LEDinvert.ino":

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller-38400-LEDinvert.ino: In function 'void loop()':

Because many Arduino sketches only consist of a single .ino file, it's easy to get the impression that the .ino file is the sketch. But this is not so. It is the folder that is the sketch, in this case:

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller

All the .ino files in the sketch folder are concatenated together and then compiled. So if you make a backup copy of your .ino file in the sketch folder then you get these redefinition errors.

So the fix is to simply move this file:

Z:\Files\Lego Mikroskop\MicroscoPy-master\Arduino\Controller\Controller-38400-LEDinvert.ino

somewhere else.

Hi pert,

THANKS A LOT ! You saved me loosing more hair because of tearing the few remaining out !
I renamed the sketch, restarted the IDE and - bingo ! Compiled like a charm!
Never would I have thought that the IDE considers all *.ino-files existing in a directory.

Thanks very much again !

Peter

You're welcome. I'm glad to hear it's working now. Although it caused you some trouble, the ability to organize a large sketch into multiple files can be very convenient. Each of the files of the sketch is shown in the Arduino IDE as a tab, so you can quickly navigate to the specific section of the code you're looking for by clicking on its tab rather than needing to scroll through a thousand lines of code in a single sketch file.

Enjoy!
Per

Hi pert,

thanks for the info ! I'm rather sure that this info is written somewhere in the instructions. I must admit - I'm one of these who starts reading the instructions of a fire extinguisher only when the house is already on fire. :grinning:

Peter