SoftwareSerial SoSerial(6, 7); // 软串口 RX(D6), TX(D7) int RECV_PIN = 11; IRrecv irrecv(RECV_PIN); IRsend irsend; decode_results results; // 显示红外线协定种类 void showIRProtocol(decode_results *results) { Serial.print("Protocol: "); // 判断红外线协定种类 switch(results->decod...
voidsetup(){/* button click interrupt */attachInterrupt(1, buttonClicked, FALLING);/* start hw & sw serial */Serial.begin(WILLIAM_BAUDRATE);// outputmySerial.begin(MIDI_BAUDRATE);// input/* set up song and songbank callbacks */setupSongHandling();/* set initial outgoing packet (to Will...
*/voidSFE_MetaWatch::sendPacket(unsignedchar* data,intlength,unsignedchar* response,intresponseLength) {intcrc = ComputeCRC(data, length -2);// Get the crc values for our stringdata[length-1] = (crc &0xFF00) >>8;// LSB goes firstdata[length-2] = crc &0xFF;// the MSB// If yo...
softSerial.println( (float) theta,1);#endif//--- transfer measured values to LaCrosse-instanceLaCrosse.bSensorId = SENSOR_ID; LaCrosse.t = theta;//--- alias temperature;LaCrosse.sendTemperature(); LaCrosse.sleep(1);/* 1 second, no power-reduction! */#ifdefUSE_SEPARATE_BATTERIE_IDLaC...