STEMpedia / Dabble

Arduino Library for Dabble app, which includes virtual shields for robot control, sensors, camera, IoT and much more. Compatible with Bluetooth modules like HC-05, HC-06, HM-10, and ESP32 (BLE or Bluetooth 2.0 or 4.0)
https://thestempedia.com/product/dabble/
GNU Lesser General Public License v3.0
47 stars 17 forks source link

ARDUINO IDE ERROR WHILE IMPORTING Dabble.h #4

Open karthik-26 opened 5 years ago

karthik-26 commented 5 years ago

I get the following error trace while importing the Dabble.h header file CODE:

`#include

void setup() { // put your setup code here, to run once:

}

void loop() { // put your main code here, to run repeatedly:

}`

The error tree i get is :

` C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\GamePadModule.cpp:5:0: warning: "PI" redefined

define PI 3.14159

^

In file included from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.h:53:0,

             from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\GamePadModule.cpp:3:

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/Arduino.h:47:0: note: this is the location of the previous definition

define PI 3.1415926535897932384626433832795

^

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp: In member function 'void SMSModule::sendMessage(String, String)':

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp:23:94: warning: invalid conversion from 'char' to 'byte {aka unsigned char*}' [-fpermissive]

Dabble.sendModuleFrame(SMS_ID,0,SENDCONTENT,1,new FunctionArg(content.length(),&content[0]));

                                                                                          ^

In file included from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp:2:0:

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.h:106:2: note: initializing argument 2 of 'FunctionArg::FunctionArg(int, byte*, bool)'

FunctionArg(int l ,byte * d, bool _saveData=false)

^

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp: In member function 'void NotificationModule::setTitle(String)':

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp:34:107: warning: invalid conversion from 'char' to 'byte {aka unsigned char*}' [-fpermissive]

Dabble.sendModuleFrame(NOTIFICATION_ID,0,CREATE_NOTIFICATION, 1, new FunctionArg(title.length(),&title[0]));

                                                                                                       ^

In file included from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp:2:0:

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.h:106:2: note: initializing argument 2 of 'FunctionArg::FunctionArg(int, byte*, bool)'

FunctionArg(int l ,byte * d, bool _saveData=false)

^

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp: In member function 'void NotificationModule::notifyPhone(String)':

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp:40:111: warning: invalid conversion from 'char' to 'byte {aka unsigned char*}' [-fpermissive]

Dabble.sendModuleFrame(NOTIFICATION_ID,0,UPDATE_NOTIFICATION, 1, new FunctionArg(content.length(),&content[0]));

                                                                                                           ^

In file included from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp:2:0:

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.h:106:2: note: initializing argument 2 of 'FunctionArg::FunctionArg(int, byte*, bool)'

FunctionArg(int l ,byte * d, bool _saveData=false)

^

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp: In member function 'void DataLoggerModule::createFile(String)':

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp:17:98: warning: invalid conversion from 'char' to 'byte {aka unsigned char*}' [-fpermissive]

Dabble.sendModuleFrame(DATALOGGER_ID,0,FILENAME,1,new FunctionArg(FileName.length(),&FileName[0]));

                                                                                              ^

In file included from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp:2:0:

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.h:106:2: note: initializing argument 2 of 'FunctionArg::FunctionArg(int, byte*, bool)'

FunctionArg(int l ,byte * d, bool _saveData=false)

^

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp: In member function 'void DataLoggerModule::createColumn(String)':

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp:52:137: warning: invalid conversion from 'char' to 'byte {aka unsigned char*}' [-fpermissive]

 Dabble.sendModuleFrame(DATALOGGER_ID,0,COLUMNNAME,2,new FunctionArg(1,&a),new FunctionArg(sendColumnName.length(),&sendColumnName[0]));

                                                                                                                                     ^

In file included from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp:2:0:

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.h:106:2: note: initializing argument 2 of 'FunctionArg::FunctionArg(int, byte*, bool)'

FunctionArg(int l ,byte * d, bool _saveData=false)

^

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp: In member function 'void DataLoggerModule::send(String, String)':

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp:117:127: warning: invalid conversion from 'char' to 'byte {aka unsigned char*}' [-fpermissive]

Dabble.sendModuleFrame(DATALOGGER_ID,0,DATATYPE_CHAR,2,new FunctionArg(1,&columnFlag),new FunctionArg(data.length(),&data[0]));

                                                                                                                           ^

In file included from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp:2:0:

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.h:106:2: note: initializing argument 2 of 'FunctionArg::FunctionArg(int, byte*, bool)'

FunctionArg(int l ,byte * d, bool _saveData=false)

^

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.cpp: In member function 'getArgumentData':

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.cpp:349:1: internal compiler error: Segmentation fault

}

^

Please submit a full bug report,

with preprocessed source if appropriate.

See http://gcc.gnu.org/bugs.html for instructions.

lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.21.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

exit status 1 Error compiling for board Arduino/Genuino Uno.`

Screenshot (2)

dhrupal93 commented 5 years ago

Hi @karthik-26 Sorry for facing some issues with Dabble Library.

  1. We have updated the Dabble App library a bit to avoid some warnings.
  2. We request you to update your Arduino IDE to 1.8.5 version (Please do not install the latest version 1.8.9 as many people are facing some issues with that). https://www.arduino.cc/en/Main/OldSoftwareReleases#previous
  3. In Arduino IDE compiler, segmentation faults are usually caused by some strange pointer handling bugs, or memory bugs. I suggest you to use 1.8.5 Arduino and try to compile some example codes.

If you are still facing any issue let us know.

fabioduque commented 3 years ago

I am having the exact same issue as the OP.

I have downloaded the older Arduino IDE 1.8.5 (deleted all previous installation files), and it still does not work, on a Windows machine. I've tried with an Arduino Duemilanove and a newer Arduino Nano RP2040 Connect (to use with a HC-05) and no example works. It's always the same compilation errors. I've also tried to download older versions of this lib.

I am not getting how a 2019 issue still exists. Am I missing something here?