Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char PingTime[6] = "3ms";
- char PingText[60] = "ping reply blah blah";
- float humidity = "40.56";
- int DigialPin = 0;
- PrintXMLTag(cl,"pingtime",PingTime);
- PrintXMLTag(cl,"PingText",PingText);
- PrintXMLTag(cl,"humidity",humidity);
- PrintXMLTag(cl,"DigialPin",DigialPin);
- void PrintXMLTag_DEC(EthernetClient cl, const char* tag, NotSure?? val)
- {
- char tmp [100];
- StrClear(tmp,100);
- // If val type is float ----------------------
- int d1 = val; // Get the integer part
- float f2 = val - d1; // Get fractional part
- int d2 = trunc(f2 * 10000);// Turn into integer
- sprintf(tmp,"<%s>%d.%02d</%s>n",tag,d1,d2,tag);
- // end float
- // If val type is string ----------------------
- // If val type is int ----------------------
- // If val type is char ----------------------
- cl.print(tmp);
- }
- template <typename SomeType>
- SomeType sum (SomeType a, SomeType b)
- {
- return a+b;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement