今天剛發現arduino串口通訊居然不支持Serial.end();請問怎麼解決這個問題,我覺得這個很重要!!! 我使用的是W806
Hi. The lack of Serial.End() method is not critical in most cases. Its work is to deinitialize the hardware UART and release the controller pins that were connected to it.
It should be noted that the HardwareSerial class is static and calling the End() method does not free RAM. It is not difficult to add support for this method, but I would like to know how you want to use it.
https://stackoverflow.com/questions/24770622/arduino-any-reason-to-have-call-serial-end
我寫了一段加密程序,簡單的說,我是通過串口監視器輸入密匙可以永久激活,一旦程序激活就關閉串口通訊,我在arduino UNO上試過了沒有問題,在W806上使用發現不支持Serial.end();
@xiaoxuesheng OK. Tomorrow I'll tell you what needs to be done
@xiaoxuesheng Unzip to "C:Users<user>AppDataLocalArduino15packagesw80x_duinohardwareXT8040.0.6coresw806"
HardwareSerial.zip
@xiaoxuesheng I'm on an extended business trip right now. I don't know when I'll be back in my lab. This is a temporary solution, I don't have time for an in-depth study right now. Write about this problem to https://github.com/board707/w80x_arduino/issues.
@AnatolSher
非常感謝Anatolsher,這對我來說足夠了。