Pylo / MCreatorLink

MCreator Link enables you to connect hardware devices such as Arduino and Raspberry Pi with Minecraft game via MCreator procedures, commands and general API for Minecraft mod developers.
https://mcreator.net/link
Apache License 2.0
24 stars 6 forks source link

issue with third party boards from adafruit #3

Closed Nep-Soundfont closed 5 years ago

Nep-Soundfont commented 5 years ago

Arduino bare minimum sketch fails to compile successfully on adafruit boards, most likely due to the board definition doesn't exist properly. if this can't be fixed, please make a circuitpython library for those with circuitpython boards like me. anyway, the log usually states this:

 void setup(HardwareSerial &serial_ref = Serial, String deviceName = BOARD);

                                         ^
Nep-Soundfont commented 5 years ago

actually ive only tried the feather M0 Express board, i'm sure it's the same for other boards though

KlemenDEV commented 5 years ago

This library is not intended to be used with CircuitPython, but with normal Arduino IDE. We don't plan to implement support for this at the moment as we do not have hardware for testing, but if anyone is interested in doing this, we can reopen this ticket and accept the pull request.

Nep-Soundfont commented 5 years ago

error log like i said: i have errors with uploading the bare minimum sketch from the arduino IDE to an adafruit feather M0 express. contrary to that, i also tried an arduino uno and it works just fine, i'm getting compiler errors with a third party arduino compatible not listed in boardnames.h

Nep-Soundfont commented 5 years ago

this is what i get with the same board while compiling the bareminimum2 sketch C:\Users\Nep Soundfont\Documents\ArduinoData\packages\adafruit\hardware\samd\1.5.2\variants\feather_m0express/variant.h:240:37: error: could not convert 'Serial' from 'Serial' to 'HardwareSerial&'

define SERIAL_PORT_MONITOR Serial

                                 ^

C:\Users\Nep Soundfont\Documents\Arduino\libraries\Minecraft_Link\src/MinecraftLink.h:54:45: note: in expansion of macro 'SERIAL_PORT_MONITOR'

 void setup(HardwareSerial &serial_ref = SERIAL_PORT_MONITOR, String deviceName = BOARD);

                                         ^

C:\Users\Nep Soundfont\Documents\Arduino\libraries\Minecraft_Link\examples\BareMinimum2\BareMinimum2.ino: In function 'void setup()':

BareMinimum2:5:46: error: no matching function for call to 'MinecraftLinkImpl::setup(Serial_&, const char [12])'

 MinecraftLink.setup(Serial, "Device Name");

                                          ^

C:\Users\Nep Soundfont\Documents\Arduino\libraries\Minecraft_Link\examples\BareMinimum2\BareMinimum2.ino:5:46: note: candidate is:

In file included from C:\Users\Nep Soundfont\Documents\Arduino\libraries\Minecraft_Link\examples\BareMinimum2\BareMinimum2.ino:1:0:

C:\Users\Nep Soundfont\Documents\Arduino\libraries\Minecraft_Link\src/MinecraftLink.h:54:10: note: void MinecraftLinkImpl::setup(HardwareSerial&, String)

 void setup(HardwareSerial &serial_ref = SERIAL_PORT_MONITOR, String deviceName = BOARD);

      ^

C:\Users\Nep Soundfont\Documents\Arduino\libraries\MinecraftLink\src/MinecraftLink.h:54:10: note: no known conversion for argument 1 from 'Serial' to 'HardwareSerial&'

exit status 1 no matching function for call to 'MinecraftLinkImpl::setup(Serial_&, const char [12])' looks approximately the same, but it's different

KlemenDEV commented 5 years ago

We have fixed this issue in Minecraft Link for Arduino 1.1.0. The update in the library manager should be available soon.