How to convert int to string on Arduino?

前端 未结 9 1437
-上瘾入骨i
-上瘾入骨i 2021-01-31 06:32

How do I convert an int, n, to a string so that when I send it over the serial, it is sent as a string?

This is what I have so far:

int ledP         


        
9条回答
  •  耶瑟儿~
    2021-01-31 07:38

    Serial.println(val) 
    Serial.println(val, format)
    

    for more you can visit to the site of arduino https://www.arduino.cc/en/Serial/Println

    wish this will help you. thanks!

提交回复
热议问题