absalom-muc / MHI-AC-Ctrl

Reads and writes data (e.g. power, mode, fan status etc.) from/to a Mitsubishi Heavy Industries (MHI) air conditioner (AC) via SPI controlled by MQTT
MIT License
253 stars 58 forks source link

Why not using hardware SPI? #169

Closed dzungpv closed 7 months ago

dzungpv commented 7 months ago

This is not a bug, but why you are not using hardware SPI? I see code using digitalWrite and digitalRead to handle SPI communication.

absalom-muc commented 7 months ago

This is explained here, last section. For using SPI with the MHI ACs you need a cycle accurate synchronization between RX and TX. With the HW SPI I was not successful implementing it.

hberntsen commented 7 months ago

Mentioned here before, I have an implementation with hardware SPI on an ESP32-C3 here: https://github.com/hberntsen/mhi-ac-ctrl-esp32-c3

glsf91 commented 7 months ago

I think we can close this one