CasaJasmina / TelegramBot-Library

Host a Telegram Bot on your Arduino, and interact with it from your favourite chat application
GNU Lesser General Public License v2.1
134 stars 53 forks source link

Can´t connect the mkr100 #23

Open GustavoPoveda opened 6 years ago

GustavoPoveda commented 6 years ago

`Arduino:1.8.5 (Windows Store 1.8.10.0) (Windows 10), Tarjeta:"Arduino/Genuino MKR1000"

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp: In member function 'message TelegramBot::getUpdates()':

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:39:4: error: 'StaticJsonBuffer' was not declared in this scope

StaticJsonBuffer<JSON_BUFF_SIZE> jsonBuffer;

^

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:39:4: note: suggested alternative:

In file included from C:\Users\Gustavo Poveda\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/StaticJsonDocument.hpp:8:0,

             from C:\Users\Gustavo Poveda\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:10,

             from C:\Users\Gustavo Poveda\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,

             from C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.h:11,

             from C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:8:

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Memory/StaticJsonBuffer.hpp:110:7: note: 'ArduinoJson::Internals::StaticJsonBuffer'

class StaticJsonBuffer : public Internals::StaticJsonBufferBase {

   ^

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:39:37: error: 'jsonBuffer' was not declared in this scope

StaticJsonBuffer<JSON_BUFF_SIZE> jsonBuffer;

                                 ^

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:44:12: error: 'class ArduinoJson::JsonObject' has no member named 'success'

if(root.success()){

        ^

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp: In member function 'String TelegramBot::sendMessage(String, String)':

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:87:3: error: 'StaticJsonBuffer' was not declared in this scope

StaticJsonBuffer jsonBuffer;

^

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:87:3: note: suggested alternative:

In file included from C:\Users\Gustavo Poveda\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/StaticJsonDocument.hpp:8:0,

             from C:\Users\Gustavo Poveda\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:10,

             from C:\Users\Gustavo Poveda\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,

             from C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.h:11,

             from C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:8:

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Memory/StaticJsonBuffer.hpp:110:7: note: 'ArduinoJson::Internals::StaticJsonBuffer'

class StaticJsonBuffer : public Internals::StaticJsonBufferBase {

   ^

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:87:36: error: 'jsonBuffer' was not declared in this scope

StaticJsonBuffer jsonBuffer;

                                ^

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:93:8: error: 'class ArduinoJson::JsonObject' has no member named 'printTo'

buff.printTo(msg);

    ^

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp: In member function 'String TelegramBot::sendMessage(String, String, TelegramKeyboard&, bool, bool)':

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:102:3: error: 'StaticJsonBuffer' was not declared in this scope

StaticJsonBuffer jsonBuffer;

^

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:102:3: note: suggested alternative:

In file included from C:\Users\Gustavo Poveda\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/StaticJsonDocument.hpp:8:0,

             from C:\Users\Gustavo Poveda\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:10,

             from C:\Users\Gustavo Poveda\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,

             from C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.h:11,

             from C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:8:

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Memory/StaticJsonBuffer.hpp:110:7: note: 'ArduinoJson::Internals::StaticJsonBuffer'

class StaticJsonBuffer : public Internals::StaticJsonBufferBase {

   ^

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:102:36: error: 'jsonBuffer' was not declared in this scope

StaticJsonBuffer jsonBuffer;

                                ^

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:107:68: error: invalid initialization of non-const reference of type 'ArduinoJson::JsonObject&' from an rvalue of type 'ArduinoJson::JsonObject'

JsonObject& reply_markup = buff.createNestedObject("reply_markup");

                                                                ^

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:108:66: error: invalid initialization of non-const reference of type 'ArduinoJson::JsonArray&' from an rvalue of type 'ArduinoJson::JsonArray'

JsonArray& keyboard = reply_markup.createNestedArray("keyboard");

                                                              ^

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:111:48: error: invalid initialization of non-const reference of type 'ArduinoJson::JsonArray&' from an rvalue of type 'ArduinoJson::JsonArray'

JsonArray& row = keyboard.createNestedArray();

                                            ^

C:\Users\Gustavo Poveda\Documents\Arduino\libraries\TelegramBot-Library-master\src\TelegramBot.cpp:122:8: error: 'class ArduinoJson::JsonObject' has no member named 'printTo'

buff.printTo(msg);

    ^

exit status 1 Error compilando para la tarjeta Arduino/Genuino MKR1000.

`

epugar commented 5 years ago

@GustavoPoveda That's my problem too. Did you find solution?

epugar commented 5 years ago

@GustavoPoveda And I just found solution!!!! Downgrade Arduino Json library to version 5.13.3 because version 6 is in beta. OMG such a stupid solution. No error

topche commented 4 years ago

blak ... work for me .... Thank you @epugar