1

Topic: Не компилируется код

Здравствуйте. При выборе bluetooth выдаёт следующую ошибку про компиляции в Arduino IDE:

In file included from /Users/vakuum/Downloads/blink/blink.ino:26:
/Users/vakuum/Downloads/blink/blink.ino: In function 'void setup()':
/Users/vakuum/Documents/Arduino/libraries/RemoteXY/src/RemoteXY.h:166:117: error: expected type-specifier before 'CRemoteXYStream_SoftSerial'
  166 |   #define RemoteXY_Init() remotexy = new CRemoteXY (RemoteXY_CONF_PROGMEM, &RemoteXY, REMOTEXY_ACCESS_PASSWORD, new CRemoteXYStream_SoftSerial (REMOTEXY_SERIAL_RX, REMOTEXY_SERIAL_TX, REMOTEXY_SERIAL_SPEED))
      |                                                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vakuum/Downloads/blink/blink.ino:59:3: note: in expansion of macro 'RemoteXY_Init'
   59 |   RemoteXY_Init ();
      |   ^~~~~~~~~~~~~

exit status 1

Compilation error: exit status 1

Если выбрать связь по WiFi то компилится без проблем.

2

Re: Не компилируется код

Опубликуйте пожалуйста полный код который вы компилируете. так же укажите для какого контроллера выполняется компиляция.

3

Re: Не компилируется код

Компиляция делается для Wemos D1 mini.
Вот полный код:
/*
   -- New project --
   
   This source code of graphical user interface
   has been generated automatically by RemoteXY editor.
   To compile this code using RemoteXY library 3.1.8 or later version
   download by link http://remotexy.com/en/library/
   To connect using RemoteXY mobile app by link http://remotexy.com/en/download/                   
     - for ANDROID 4.11.1 or later version;
     - for iOS 1.9.1 or later version;
   
   This source code 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.   
*/

//////////////////////////////////////////////
//        RemoteXY include library          //
//////////////////////////////////////////////

// определение режима соединения и подключение библиотеки RemoteXY
#define REMOTEXY_MODE__SOFTSERIAL
#include <SoftwareSerial.h>

#include <RemoteXY.h>

// настройки соединения
#define REMOTEXY_SERIAL_RX D1
#define REMOTEXY_SERIAL_TX D2
#define REMOTEXY_SERIAL_SPEED 9600


// конфигурация интерфейса 
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =   // 19 bytes
  { 255,1,0,0,0,12,0,16,31,1,1,0,14,26,37,37,2,31,0 };
 
// структура определяет все переменные и события вашего интерфейса управления
struct {

    // input variables
  uint8_t button_1; // =1 если кнопка нажата, иначе =0

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

#define PIN_BUTTON_1 13

void setup() 
{
  RemoteXY_Init (); 
   
  pinMode (PIN_BUTTON_1, OUTPUT);
   
  // TODO you setup code
   
}

void loop() 

  RemoteXY_Handler ();
   
  digitalWrite(PIN_BUTTON_1, (RemoteXY.button_1==0)?LOW:HIGH);
   
  // TODO you loop code
  // используйте структуру RemoteXY для передачи данных

}

4

Re: Не компилируется код

Да, действительно. Ни разу не тестировали SoftwarwSerial для ESP8266.
Обновите релиз библиотеки до 3.1.10.
Можете не дожидаться пока он появится в ArduinoIDE и скачать с Github https://github.com/RemoteXY/RemoteXY-Ar … 3.1.10.zip
Ссылка на репозитарий https://github.com/RemoteXY/RemoteXY-Ar … ree/3.1.10