Compile error with In function 'void SPI_sync()':

Hello,
I try to compile the ino file from this project: GitHub - rjdekker/MHI2MQTT: Arduino-based WiFi/MQTT controller for wireless operation of a Mitsubishi Heavy Industries air conditioner through its serial CNS port

See attachement.

But i get the error:

C:\Users\steph\Downloads\rjdekker-MHI2MQTT-v1.0.0-14-ge737f6e\rjdekker-MHI2MQTT-e737f6e\src\MHI-SPI2ESP\MHI-SPI2ESP.ino: In function 'void SPI_sync()':

C:\Users\steph\Downloads\rjdekker-MHI2MQTT-v1.0.0-14-ge737f6e\rjdekker-MHI2MQTT-e737f6e\src\MHI-SPI2ESP\MHI-SPI2ESP.ino:152:49: warning: invalid conversion from 'volatile void*' to 'void*' [-fpermissive]

   memcpy(&tx_SPIframe[9], &frameVariant[0][0], 9);                                                                 //Copy (part of) the next frame to the current frame for sending on the upcoming bitfield 18 clock cycle

                                                 ^

In file included from C:\Users\steph\Downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\arduino\avr\cores\arduino/Arduino.h:25:0,

                 from C:\Users\steph\AppData\Local\Temp\arduino_build_532840\sketch\MHI-SPI2ESP.ino.cpp:1:

c:\users\steph\downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\tools\avr\avr\include\string.h:191:14: note:   initializing argument 1 of 'void* memcpy(void*, const void*, size_t)'

 extern void *memcpy(void *, const void *, size_t);

              ^

C:\Users\steph\Downloads\rjdekker-MHI2MQTT-v1.0.0-14-ge737f6e\rjdekker-MHI2MQTT-e737f6e\src\MHI-SPI2ESP\MHI-SPI2ESP.ino: In function 'void loop()':

C:\Users\steph\Downloads\rjdekker-MHI2MQTT-v1.0.0-14-ge737f6e\rjdekker-MHI2MQTT-e737f6e\src\MHI-SPI2ESP\MHI-SPI2ESP.ino:275:67: warning: invalid conversion from 'volatile void*' to 'const void*' [-fpermissive]

                       memcpy(&toESP.currentMHI, &rx_SPIframe[3], 7);                                               //Copy bitfields 4-10 from the most recent MHI SPI frame to new array for sending to ESP

                                                                   ^

In file included from C:\Users\steph\Downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\arduino\avr\cores\arduino/Arduino.h:25:0,

                 from C:\Users\steph\AppData\Local\Temp\arduino_build_532840\sketch\MHI-SPI2ESP.ino.cpp:1:

c:\users\steph\downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\tools\avr\avr\include\string.h:191:14: note:   initializing argument 2 of 'void* memcpy(void*, const void*, size_t)'

 extern void *memcpy(void *, const void *, size_t);

              ^

C:\Users\steph\Downloads\rjdekker-MHI2MQTT-v1.0.0-14-ge737f6e\rjdekker-MHI2MQTT-e737f6e\src\MHI-SPI2ESP\MHI-SPI2ESP.ino:308:62: warning: invalid conversion from 'volatile void*' to 'const void*' [-fpermissive]

                   memcpy(&rx_bitfield4_10, &rx_SPIframe[3], 7);                                                    //Get bitfields 4-10 from the last MHI SPI frame to use for the upcoming tx_SPIframe update

                                                              ^

In file included from C:\Users\steph\Downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\arduino\avr\cores\arduino/Arduino.h:25:0,

                 from C:\Users\steph\AppData\Local\Temp\arduino_build_532840\sketch\MHI-SPI2ESP.ino.cpp:1:

c:\users\steph\downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\tools\avr\avr\include\string.h:191:14: note:   initializing argument 2 of 'void* memcpy(void*, const void*, size_t)'

 extern void *memcpy(void *, const void *, size_t);

              ^

C:\Users\steph\Downloads\rjdekker-MHI2MQTT-v1.0.0-14-ge737f6e\rjdekker-MHI2MQTT-e737f6e\src\MHI-SPI2ESP\MHI-SPI2ESP.ino:330:73: warning: invalid conversion from 'volatile void*' to 'void*' [-fpermissive]

               memcpy(&tx_SPIframe[9], &frameVariant[variantnumber][0], 9);                                         //Copy (part of) the next frame to the current frame for sending on the upcoming bitfield 18 clock cycle

                                                                         ^

In file included from C:\Users\steph\Downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\arduino\avr\cores\arduino/Arduino.h:25:0,

                 from C:\Users\steph\AppData\Local\Temp\arduino_build_532840\sketch\MHI-SPI2ESP.ino.cpp:1:

c:\users\steph\downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\tools\avr\avr\include\string.h:191:14: note:   initializing argument 1 of 'void* memcpy(void*, const void*, size_t)'

 extern void *memcpy(void *, const void *, size_t);

              ^

Can somebody help me…

MHI-SPI2ESP.ino (29.5 KB)

I get the same WARNING (not ERROR) messages that you do. Perhaps the Arduino IDE has been updated in the year since the project was last updated.

Because they are only warnings, the compile completes. Have you tried the sketch to see if it works?

How can i test it? It's for my airconditioner and when i connect the hardware, only the mqtt client. i cant control the spi part...