|
Post by yhellowt on Jan 26, 2019 6:37:23 GMT -8
I have connected my GameDuino to a Arduino Uno Wifi. I receive the following error message when compiling the code, eg. HelloWorld, for the Arduino Uno Wifi architecture. How can I solve this issue? insert code hereIn file included from /Users/tom.ghelen/Documents/Arduino/libraries/Gameduino2/1.Basics/helloworld/helloworld.ino:3:0: /Users/tom.ghelen/Documents/Arduino/libraries/Gameduino2/GD2.h: In member function 'void sdcard::begin(byte)': /Users/tom.ghelen/Documents/Arduino/libraries/Gameduino2/GD2.h:17:14: error: 'SPSR0' was not declared in this scope #define SPSR SPSR0 ^ /Users/tom.ghelen/Documents/Arduino/libraries/Gameduino2/GD2.h:303:5: note: in expansion of macro 'SPSR' SPSR = (1 << SPI2X); ^ In file included from /Users/tom.ghelen/Documents/Arduino/libraries/Gameduino2/1.Basics/helloworld/helloworld.ino:3:0: /Users/tom.ghelen/Documents/Arduino/libraries/Gameduino2/GD2.h:303:18: error: 'SPI2X' was not declared in this scope SPSR = (1 << SPI2X); ^ Multiple libraries were found for "EEPROM.h" Used: /Users/tom.ghelen/Library/Arduino15/packages/arduino/hardware/megaavr/1.6.24/libraries/EEPROM Not used: /Users/tom.ghelen/Documents/Arduino/libraries/arduino-NVM exit status 1 Error compiling for board Arduino Uno WiFi Rev2.
|
|
|
Post by tftlcdcyg on Jan 26, 2019 12:11:47 GMT -8
Which arduino IDE do you used?, I recommend to you the IDE 1.8.7
|
|
|
Post by yhellowt on Jan 27, 2019 6:04:49 GMT -8
Working from IDE 1.8.7 generates the same issue. I update the GD2.h and wires.h library code with #if !defined(__DUE__) && !defined(ESP8266) && !defined(ARDUINO_ARCH_STM32L4) && !defined(ARDUINO_ARCH_MEGAAVR) SPI.setClockDivider(SPI_CLOCK_DIV2); SPSR = (1 << SPI2X); #endif Of course this solved the error message. Unfortunately, after the uploading the code, the screen does not turn on.
|
|
|
Post by jamesbowman on Jan 29, 2019 6:22:09 GMT -8
|
|
|
Post by yhellowt on Feb 1, 2019 7:12:47 GMT -8
Thanks for the support!
It seems indeed that the SPI pins are not 11, 12 & 13. I used jumpers to connect the SPI to the ICSP pins. The display works.
I am now having the issue that everything slows down massively only when I read JPGs from the SD Card. It works but takes massive time. Any idea?
|
|
|
Post by jamesbowman on Feb 1, 2019 7:14:27 GMT -8
Is this Gameduino 2 or 3? Gameduino 2 JPG loading took a few seconds. On Gameduino 3 it's hardware accelerated.
|
|
|
Post by yhellowt on Feb 3, 2019 23:57:04 GMT -8
It is a Gameduino 3. It works fine with JPGs on the Arduino Uno. Same code, without JPGs as backgrounds works fine on the Arduino WiFi Rev 2. Similar code with JPGs slows down. Seems to bee something with the clock. Might this be something that needs to be updated in the library?
|
|