Files
IoTManager/lib/ArduinoStreamUtils/examples/StringPrint/StringPrint.ino
Dmitry Borisenko b8a8290928 compiling
2021-12-13 00:58:42 +01:00

54 lines
1.9 KiB
C++

// StreamUtils - github.com/bblanchon/ArduinoStreamUtils
// Copyright Benoit Blanchon 2019-2021
// MIT License
//
// This example shows how to use StringPrint
#include <StreamUtils.h>
void setup() {
// Initialize serial port
Serial.begin(9600);
while (!Serial)
continue;
StringPrint stream;
stream.print("Temperature = ");
stream.print(22.3);
stream.print(" °C");
Serial.print(stream.str());
}
void loop() {
// no used in this example
}
/*****************************************************
* *
* Love this project? *
* Star it on GitHub! *
* *
* .,,. *
* ,,:1. *
* ,.,:;1 *
* .,,,::;: *
* ,,,,::;;. *
* .,,,:::;;; *
* .....,,,,...,.,,,,,,:::,,,,,,,,,,,,, *
* ,,,,,,,,,,,:,...,,,,,,:::,,,,:::;;;11l *
* .;::::::::,,,,,,,,,,:::::,,::;;;1lt *
* .;;;:::,,,,,,,,::::::;:::;;1t: *
* :;;:,,,,,,::::::;;;;;;l1 *
* ,,,,:::::::;;;;;;l *
* .,,,,::::;;;;;;;:::: *
* ,,,,,:::;;;;;::,:::1 *
* ,,,,,::;;;t1:,,:::::;l *
* .,,,,:;;ll ;::::::;;, *
* ,,,:;ll. .1:::;;l *
* .,:lt, .1;;l: *
* *
* https://github.com/bblanchon/ArduinoStreamUtils *
* *
*****************************************************/