HILFE bei Arduino Fehlermeldungen

Hallo zusammen,ich habe das Problem, daß ich einen Arduino Pro Micro mit einem Scetch bespielen möchte aber immer diese Fehlermeldung bekomme:

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Windows 7), Board: "Arduino Micro"
buttsimpjoy_02d:58: error: function definition does not declare parameters
buttsimpjoy_02d:124: error: 'Keypad' does not name a type
buttsimpjoy_02d:127: error: 'Joystick_' does not name a type
buttsimpjoy_02d.ino: In function 'void setup()':
buttsimpjoy_02d:134: error: 'Joystick' was not declared in this scope
buttsimpjoy_02d.ino: In function 'void CheckAllButtons()':
buttsimpjoy_02d:150: error: 'buttbx' was not declared in this scope
buttsimpjoy_02d:152: error: 'LIST_MAX' was not declared in this scope
buttsimpjoy_02d:157: error: 'PRESSED' was not declared in this scope
buttsimpjoy_02d:158: error: 'HOLD' was not declared in this scope
buttsimpjoy_02d:159: error: 'Joystick' was not declared in this scope
buttsimpjoy_02d:161: error: 'RELEASED' was not declared in this scope
buttsimpjoy_02d:162: error: 'IDLE' was not declared in this scope
buttsimpjoy_02d.ino: In function 'void rotary_init()':
buttsimpjoy_02d:175: error: 'rotaries' was not declared in this scope
buttsimpjoy_02d.ino: In function 'unsigned char rotary_process(int)':
buttsimpjoy_02d:191: error: 'rotaries' was not declared in this scope
buttsimpjoy_02d.ino: In function 'void CheckAllEncoders()':
buttsimpjoy_02d:200: error: 'Joystick' was not declared in this scope
buttsimpjoy_02d:200: error: 'rotaries' was not declared in this scope
buttsimpjoy_02d:203: error: 'Joystick' was not declared in this scope
buttsimpjoy_02d:203: error: 'rotaries' was not declared in this scope

Es handelt sich um eine Buttonbox von:

Habe bereits die Lybaries wie auf den Bilder hinzugefügt.

Was will die Software von mir? bzw. was braucht sie?
Ich wäre sehr dankbar wenn mir jemand weiter helfen könnte, denn ich weiß nicht mehr weiter.

mfg
Niko030

Sollen wir jetzt aus den Fehlermeldungen den Sketch raten, der sie verursacht?
Bitte den Sketch in Code Tags einfügen.

buttsimpjoy_02d:58: error: function definition does not declare parameters

Fängst du am besten in der Nähe von Zeile 58 an zu suchen, wo dir was beim Copy&Paste verloren gegangen ist.

Da wird eventuell die Verwendung einer Funktion für ihre Definition gehalten ?
Oder du hast den Compiler sonstwie ziemlich durcheinander gebracht.

Die Seite von deinem Link heisst nicht umsonst DIY. "Mach du das mal selbst" :wink:

Ahhhh… jetz hab ich ein Code tags !

/*
  Joystick.h

  Copyright (c) 2015-2017, Matthew Heironimus

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#ifndef JOYSTICK_h
#define JOYSTICK_h

#include <DynamicHID/DynamicHID.h>

#if ARDUINO < 10606
#error The Joystick library requires Arduino IDE 1.6.6 or greater. Please update your IDE.
#endif // ARDUINO < 10606

#if ARDUINO > 10606
#if !defined(USBCON)
#error The Joystick library can only be used with a USB MCU (e.g. Arduino Leonardo, Arduino Micro, etc.).
#endif // !defined(USBCON)
#endif // ARDUINO > 10606

#if !defined(_USING_DYNAMIC_HID)

#warning "Using legacy HID core (non pluggable)"

#else // !defined(_USING_DYNAMIC_HID)

//================================================================================
//  Joystick (Gamepad)

#define JOYSTICK_DEFAULT_REPORT_ID         0x03
#define JOYSTICK_DEFAULT_BUTTON_COUNT        32
#define JOYSTICK_DEFAULT_AXIS_MINIMUM         0
#define JOYSTICK_DEFAULT_AXIS_MAXIMUM      1023
#define JOYSTICK_DEFAULT_SIMULATOR_MINIMUM    0
#define JOYSTICK_DEFAULT_SIMULATOR_MAXIMUM 1023
#define JOYSTICK_DEFAULT_HATSWITCH_COUNT      2
#define JOYSTICK_HATSWITCH_COUNT_MAXIMUM      2
#define JOYSTICK_HATSWITCH_RELEASE           -1
#define JOYSTICK_TYPE_JOYSTICK             0x04
#define JOYSTICK_TYPE_GAMEPAD              0x05
#define JOYSTICK_TYPE_MULTI_AXIS           0x08

class Joystick_
{
private:

    // Joystick State
	int16_t	                 _xAxis;
	int16_t	                 _yAxis;
	int16_t	                 _zAxis;
	int16_t	                 _xAxisRotation;
	int16_t	                 _yAxisRotation;
	int16_t	                 _zAxisRotation;
	int16_t                  _throttle;
	int16_t                  _rudder;
	int16_t					 _accelerator;
	int16_t					 _brake;
	int16_t					 _steering;
	int16_t	                 _hatSwitchValues[JOYSTICK_HATSWITCH_COUNT_MAXIMUM];
    uint8_t                 *_buttonValues = NULL;

    // Joystick Settings
    bool                     _autoSendState;
    uint8_t                  _buttonCount;
    uint8_t                  _buttonValuesArraySize = 0;
	uint8_t					 _hatSwitchCount;
	uint8_t					 _includeAxisFlags;
	uint8_t					 _includeSimulatorFlags;
	int16_t                  _xAxisMinimum = JOYSTICK_DEFAULT_AXIS_MINIMUM;
	int16_t                  _xAxisMaximum = JOYSTICK_DEFAULT_AXIS_MAXIMUM;
	int16_t                  _yAxisMinimum = JOYSTICK_DEFAULT_AXIS_MINIMUM;
	int16_t                  _yAxisMaximum = JOYSTICK_DEFAULT_AXIS_MAXIMUM;
	int16_t                  _zAxisMinimum = JOYSTICK_DEFAULT_AXIS_MINIMUM;
	int16_t                  _zAxisMaximum = JOYSTICK_DEFAULT_AXIS_MAXIMUM;
	int16_t                  _rxAxisMinimum = JOYSTICK_DEFAULT_AXIS_MINIMUM;
	int16_t                  _rxAxisMaximum = JOYSTICK_DEFAULT_AXIS_MAXIMUM;
	int16_t                  _ryAxisMinimum = JOYSTICK_DEFAULT_AXIS_MINIMUM;
	int16_t                  _ryAxisMaximum = JOYSTICK_DEFAULT_AXIS_MAXIMUM;
	int16_t                  _rzAxisMinimum = JOYSTICK_DEFAULT_AXIS_MINIMUM;
	int16_t                  _rzAxisMaximum = JOYSTICK_DEFAULT_AXIS_MAXIMUM;
	int16_t                  _rudderMinimum = JOYSTICK_DEFAULT_SIMULATOR_MINIMUM;
	int16_t                  _rudderMaximum = JOYSTICK_DEFAULT_SIMULATOR_MAXIMUM;
	int16_t                  _throttleMinimum = JOYSTICK_DEFAULT_SIMULATOR_MINIMUM;
	int16_t                  _throttleMaximum = JOYSTICK_DEFAULT_SIMULATOR_MAXIMUM;
	int16_t                  _acceleratorMinimum = JOYSTICK_DEFAULT_SIMULATOR_MINIMUM;
	int16_t                  _acceleratorMaximum = JOYSTICK_DEFAULT_SIMULATOR_MAXIMUM;
	int16_t                  _brakeMinimum = JOYSTICK_DEFAULT_SIMULATOR_MINIMUM;
	int16_t                  _brakeMaximum = JOYSTICK_DEFAULT_SIMULATOR_MAXIMUM;
	int16_t                  _steeringMinimum = JOYSTICK_DEFAULT_SIMULATOR_MINIMUM;
	int16_t                  _steeringMaximum = JOYSTICK_DEFAULT_SIMULATOR_MAXIMUM;

	uint8_t                  _hidReportId;
	uint8_t                  _hidReportSize; 

protected:
	int buildAndSet16BitValue(bool includeValue, int16_t value, int16_t valueMinimum, int16_t valueMaximum, int16_t actualMinimum, int16_t actualMaximum, uint8_t dataLocation[]);
	int buildAndSetAxisValue(bool includeAxis, int16_t axisValue, int16_t axisMinimum, int16_t axisMaximum, uint8_t dataLocation[]);
	int buildAndSetSimulationValue(bool includeValue, int16_t value, int16_t valueMinimum, int16_t valueMaximum, uint8_t dataLocation[]);

public:
	Joystick_(
		uint8_t hidReportId = JOYSTICK_DEFAULT_REPORT_ID,
		uint8_t joystickType = JOYSTICK_TYPE_JOYSTICK,
        uint8_t buttonCount = JOYSTICK_DEFAULT_BUTTON_COUNT,
		uint8_t hatSwitchCount = JOYSTICK_DEFAULT_HATSWITCH_COUNT,
		bool includeXAxis = true,
		bool includeYAxis = true,
		bool includeZAxis = true,
		bool includeRxAxis = true,
		bool includeRyAxis = true,
		bool includeRzAxis = true,
		bool includeRudder = true,
		bool includeThrottle = true,
		bool includeAccelerator = true,
		bool includeBrake = true,
		bool includeSteering = true);

	void begin(bool initAutoSendState = true);
	void end();
	
	// Set Range Functions
	inline void setXAxisRange(int16_t minimum, int16_t maximum)
	{
		_xAxisMinimum = minimum;
		_xAxisMaximum = maximum;
	}
	inline void setYAxisRange(int16_t minimum, int16_t maximum)
	{
		_yAxisMinimum = minimum;
		_yAxisMaximum = maximum;
	}
	inline void setZAxisRange(int16_t minimum, int16_t maximum)
	{
		_zAxisMinimum = minimum;
		_zAxisMaximum = maximum;
	}
	inline void setRxAxisRange(int16_t minimum, int16_t maximum)
	{
		_rxAxisMinimum = minimum;
		_rxAxisMaximum = maximum;
	}
	inline void setRyAxisRange(int16_t minimum, int16_t maximum)
	{
		_ryAxisMinimum = minimum;
		_ryAxisMaximum = maximum;
	}
	inline void setRzAxisRange(int16_t minimum, int16_t maximum)
	{
		_rzAxisMinimum = minimum;
		_rzAxisMaximum = maximum;
	}
	inline void setRudderRange(int16_t minimum, int16_t maximum)
	{
		_rudderMinimum = minimum;
		_rudderMaximum = maximum;
	}
	inline void setThrottleRange(int16_t minimum, int16_t maximum)
	{
		_throttleMinimum = minimum;
		_throttleMaximum = maximum;
	}
	inline void setAcceleratorRange(int16_t minimum, int16_t maximum)
	{
		_acceleratorMinimum = minimum;
		_acceleratorMaximum = maximum;
	}
	inline void setBrakeRange(int16_t minimum, int16_t maximum)
	{
		_brakeMinimum = minimum;
		_brakeMaximum = maximum;
	}
	inline void setSteeringRange(int16_t minimum, int16_t maximum)
	{
		_steeringMinimum = minimum;
		_steeringMaximum = maximum;
	}

	// Set Axis Values
	void setXAxis(int16_t value);
	void setYAxis(int16_t value);
	void setZAxis(int16_t value);
	void setRxAxis(int16_t value);
	void setRyAxis(int16_t value);
	void setRzAxis(int16_t value);

	// Set Simuation Values
	void setRudder(int16_t value);
	void setThrottle(int16_t value);
	void setAccelerator(int16_t value);
	void setBrake(int16_t value);
	void setSteering(int16_t value);

	void setButton(uint8_t button, uint8_t value);
	void pressButton(uint8_t button);
	void releaseButton(uint8_t button);

	void setHatSwitch(int8_t hatSwitch, int16_t value);

	void sendState();
};

#endif // !defined(_USING_DYNAMIC_HID)
#endif // JOYSTICK_h

//Arduino IDE 1.6.6 (or above) !

Das hast du gesehen ?

Dein Arduino:
Arduino: 1.0.6 (Windows 7), Board: "Arduino Micro"

Benutze Arduini IDE 1.8.7 und ein Arduino Pro Micro und bekomme jetz folgende Meldung:

Bekomme jetzt das:

In file included from C:\Users\Niko\Desktop\hilfe\hilfe.ino:17:0:

Joystick.h:24:35: error: DynamicHID/DynamicHID.h: No such file or directory

compilation terminated.

Bibliothek Keypad-master in Version 3.1.1 im Ordner: C:\Users\Niko\Documents\Arduino\libraries\Keypad-master wird verwendet
exit status 1
DynamicHID/DynamicHID.h: No such file or directory

Und?
Ist die Datei
<DynamicHID/DynamicHID.h>
da?

Ich weiß nicht wo sie sein soll und wenn sie nicht da ist weiß ich nicht wo sie hin soll.
Handelt es sich um 2 Dateien oder um einen Unterordner der die Datei DynamicHID.h enthält ?
Finde aus Github nur 2 Dateien zum Thema: DynamicHID.h und DynmicHID.cpp.

Ratlosigkeit

Habe einen Ordner(DynamicHID) inkl. der Datei DynamicHID.h in den AxisJoystick-master Ordner kopiert und jetzt klappts.

Neue Fehlermeldung:
Fehler beim komplimentieren des Boards. :smiling_imp:

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega32u4 -o "C:\\Users\\Niko\\AppData\\Local\\Temp\\arduino_build_98449/buttsimpjoy_02d.ino.elf" "C:\\Users\\Niko\\AppData\\Local\\Temp\\arduino_build_98449\\sketch\\buttsimpjoy_02d.ino.cpp.o" "C:\\Users\\Niko\\AppData\\Local\\Temp\\arduino_build_98449\\libraries\\AxisJoystick-master\\AxisJoystick.cpp.o" "C:\\Users\\Niko\\AppData\\Local\\Temp\\arduino_build_98449\\libraries\\AxisJoystick-master\\DynamicHID\\DynamicHID.cpp.o" "C:\\Users\\Niko\\AppData\\Local\\Temp\\arduino_build_98449\\libraries\\Keypad-master\\Key.cpp.o" "C:\\Users\\Niko\\AppData\\Local\\Temp\\arduino_build_98449\\libraries\\Keypad-master\\Keypad.cpp.o" "C:\\Users\\Niko\\AppData\\Local\\Temp\\arduino_build_98449/..\\arduino_cache_320071\\core\\core_arduino_avr_micro_0c812875ac70eb4a9b385d8fb077f54c.a" "-LC:\\Users\\Niko\\AppData\\Local\\Temp\\arduino_build_98449" -lm
C:\Users\Niko\AppData\Local\Temp\cc97Uq45.ltrans0.ltrans.o: In function `__static_initialization_and_destruction_0':

C:\Users\Niko\Desktop\Simulatorbau\Buttonbox\aktueller_Buttonbox_Scetch\buttsimpjoy_02d/buttsimpjoy_02d.ino:125: undefined reference to `Joystick_::Joystick_(unsigned char, unsigned char, unsigned char, unsigned char, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool)'

C:\Users\Niko\AppData\Local\Temp\cc97Uq45.ltrans0.ltrans.o: In function `setup':

C:\Users\Niko\Desktop\Simulatorbau\Buttonbox\aktueller_Buttonbox_Scetch\buttsimpjoy_02d/buttsimpjoy_02d.ino:132: undefined reference to `Joystick_::begin(bool)'

C:\Users\Niko\AppData\Local\Temp\cc97Uq45.ltrans0.ltrans.o: In function `CheckAllEncoders':

C:\Users\Niko\Desktop\Simulatorbau\Buttonbox\aktueller_Buttonbox_Scetch\buttsimpjoy_02d/buttsimpjoy_02d.ino:198: undefined reference to `Joystick_::setButton(unsigned char, unsigned char)'

C:\Users\Niko\Desktop\Simulatorbau\Buttonbox\aktueller_Buttonbox_Scetch\buttsimpjoy_02d/buttsimpjoy_02d.ino:201: undefined reference to `Joystick_::setButton(unsigned char, unsigned char)'

C:\Users\Niko\Desktop\Simulatorbau\Buttonbox\aktueller_Buttonbox_Scetch\buttsimpjoy_02d/buttsimpjoy_02d.ino:201: undefined reference to `Joystick_::setButton(unsigned char, unsigned char)'

C:\Users\Niko\AppData\Local\Temp\cc97Uq45.ltrans0.ltrans.o: In function `CheckAllButtons':

C:\Users\Niko\Desktop\Simulatorbau\Buttonbox\aktueller_Buttonbox_Scetch\buttsimpjoy_02d/buttsimpjoy_02d.ino:161: undefined reference to `Joystick_::setButton(unsigned char, unsigned char)'

collect2.exe: error: ld returned 1 exit status

Bibliothek AxisJoystick-master in Version 1.0.2 im Ordner: C:\Users\Niko\Documents\Arduino\libraries\AxisJoystick-master  wird verwendet
Bibliothek Keypad-master in Version 3.1.1 im Ordner: C:\Users\Niko\Documents\Arduino\libraries\Keypad-master  wird verwendet
exit status 1
Fehler beim Kompilieren für das Board Arduino/Genuino Micro.

niko030:
Habe einen Ordner(DynamicHID) inkl. der Datei DynamicHID.h in den AxisJoystick-master Ordner kopiert und jetzt klappts.

Der Ordner sollte in den libraries Ordner

Hab ich gemacht :sunglasses:

Fehler besteht weiterhin.