MCPcopy Create free account
hub / github.com/DanielOgorchock/ST_Anything / send

Method send

Arduino/libraries/SmartThings/SmartThingsThingShield.cpp:371–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369
370 //*****************************************************************************
371 void SmartThingsThingShield::send(String message)
372 {
373 // e.g. thing.print("raw 0x0 {00 00 0A 0A 62 75 74 74 6f 6e 20 64 6f 77 6e }");
374 _mySerial->print(F("raw 0x0 { 00 00 0A 0A "));
375
376 if (_isDebugEnabled)
377 {
378 Serial.print(F("<-| raw 0x0 { 00 00 0A 0A "));
379 }
380
381 for (int i = 0; i < message.length(); i++)
382 {
383 _mySerial->print(message[i], HEX);
384 _mySerial->print(' ');
385
386 if (_isDebugEnabled)
387 {
388 Serial.print(message[i], HEX);
389 Serial.print(' ');
390 }
391 }
392
393 _mySerial->print(F("}\nsend 0x0 1 1\n"));
394
395 if (_isDebugEnabled)
396 {
397 Serial.print(F("}\nsend 0x0 1 1\n"));
398 }
399 }
400
401 //*****************************************************************************
402 void SmartThingsThingShield::shieldSetLED(uint8_t red, uint8_t green, uint8_t blue)

Callers 2

writeStateToPinMethod · 0.45
sendStringsMethod · 0.45

Calls 1

printMethod · 0.80

Tested by

no test coverage detected