MQTT Code from You Tube Post

HI

I copied the SendCoonectPacket from the video. And I get the following error when compiling the function
Arduino: 1.8.5 (Windows 8.1), TD: 1.41, Board: “NodeMCU 1.0 (ESP-12E Module), 80 MHz, 4M (1M SPIFFS), v2 Prebuilt (MSS=536), Disabled, None, 115200”

Z:\ArduinoCode\AT_Test_A9Board\AT_Test_A9Board.ino: In function ‘void SendConnectPacket()’:

AT_Test_A9Board:164: error: call of overloaded ‘write(unsigned int)’ is ambiguous

 mySerial.write(MQTTKeepAlive >> 8);

                                  ^

Z:\ArduinoCode\AT_Test_A9Board\AT_Test_A9Board.ino:164:38: note: candidates are:

In file included from Z:\ArduinoCode\AT_Test_A9Board\AT_Test_A9Board.ino:3:0:

C:\Users\meir\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\SoftwareSerial/SoftwareSerial.h:48:19: note: virtual size_t SoftwareSerial::write(uint8_t)

virtual size_t write(uint8_t byte);

               ^

In file included from C:\Users\meir\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Stream.h:26:0,

             from C:\Users\meir\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/HardwareSerial.h:31,

             from C:\Users\meir\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Arduino.h:246,

             from sketch\AT_Test_A9Board.ino.cpp:1:

C:\Users\meir\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Print.h:56:16: note: size_t Print::write(const char*)

     size_t write(const char *str) {

            ^

Multiple libraries were found for “SoftwareSerial.h”
Used: C:\Users\meir\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\SoftwareSerial
Not used: C:\Users\meir\Documents\Arduino\libraries\espsoftwareserial-master
Not used: C:\Program Files (x86)\Arduino\libraries\espsoftwareserial-master
exit status 1
call of overloaded ‘write(unsigned int)’ is ambiguous

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

Any suggestions?
Also see the screen shot of the Arduino

I think you are using code developed by Peter (@mbari )
May be he can help.