printf()

您所在的位置:网站首页 serialprintf用法 printf()

printf()

#printf()| 来源: 网络整理| 查看: 265

Serialprintf()

Serial.printf, printf, Serial1.printf, printf

Since 0.4.6:

Provides printf-style formatting over serial.

printf allows strings to be built by combining a number of values with text.

Serial.printf("Reading temperature sensor at %s...", Time.timeStr().c_str()); float temp = readTemp(); Serial.printf("the temperature today is %f Kelvin", temp); Serial.println();

Running this code prints:

Reading temperature sensor at Thu 01 Oct 2015 12:34...the temperature today is 293.1 Kelvin.

The last printf() call could be changed to printlnf() to avoid a separate call to println().



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3