Add an example of sendRaw() to IRsendDemo.ino (#270) · crankyoldgit/IRremoteESP8266@625a50b (original) (raw)

`@@ -35,6 +35,15 @@

`

35

35

``

36

36

`IRsend irsend(4); // An IR LED is controlled by GPIO pin 4 (D2)

`

37

37

``

``

38

`+

// Example of data captured by IRrecvDumpV2.ino

`

``

39

`+

uint16_t rawData[67] = {9000, 4500, 650, 550, 650, 1650, 600, 550, 650, 550,

`

``

40

`+

600, 1650, 650, 550, 600, 1650, 650, 1650, 650, 1650,

`

``

41

`+

600, 550, 650, 1650, 650, 1650, 650, 550, 600, 1650,

`

``

42

`+

650, 1650, 650, 550, 650, 550, 650, 1650, 650, 550,

`

``

43

`+

650, 550, 650, 550, 600, 550, 650, 550, 650, 550,

`

``

44

`+

650, 1650, 600, 550, 650, 1650, 650, 1650, 650, 1650,

`

``

45

`+

650, 1650, 650, 1650, 650, 1650, 600};

`

``

46

+

38

47

`void setup() {

`

39

48

` irsend.begin();

`

40

49

` Serial.begin(115200, SERIAL_8N1, SERIAL_TX_ONLY);

`

`@@ -47,4 +56,7 @@ void loop() {

`

47

56

` Serial.println("Sony");

`

48

57

` irsend.sendSony(0xa90, 12, 2);

`

49

58

`delay(2000);

`

``

59

`+

Serial.println("a rawData capture from IRrecvDumpV2");

`

``

60

`+

irsend.sendRaw(rawData, 67, 38); // Send a raw data capture at 38kHz.

`

``

61

`+

delay(2000);

`

50

62

`}

`