2.接下來,可以看到空白光碟的資訊。
3.再將要燒錄的 MP3 檔案,使用滑鼠拖拉到 Windows Media Player 指定位置。
4.確認燒錄的格式是要視選音訊 CD;點擊[其他燒錄選項]設定額外參數。
5.一切就緒後,點擊[開始燒錄]。
參考資料來源: http://key.chtouch.com/ContentView.aspx?P=2050
// readCapacitivePin // Input: Arduino pin number // Output: A number, from 0 to 17 expressing // how much capacitance is on the pin // When you touch the pin, or whatever you have // attached to it, the number will get higher #include "pins_arduino.h" // Arduino pre-1.0 needs this uint8_t readCapacitivePin(int pinToMeasure) { // Variables used to translate from Arduino to AVR pin naming volatile uint8_t* port; volatile uint8_t* ddr; volatile uint8_t* pin; // Here we translate the input pin number from // Arduino pin number to the AVR PORT, PIN, DDR, // and which bit of those registers we care about. byte bitmask; port = portOutputRegister(digitalPinToPort(pinToMeasure)); ddr = portModeRegister(digitalPinToPort(pinToMeasure)); bitmask = digitalPinToBitMask(pinToMeasure); pin = portInputRegister(digitalPinToPort(pinToMeasure)); // Discharge the pin first by setting it low and output *port &= ~(bitmask); *ddr |= bitmask; delay(1); // Prevent the timer IRQ from disturbing our measurement noInterrupts(); // Make the pin an input with the internal pull-up on *ddr &= ~(bitmask); *port |= bitmask; // Now see how long the pin to get pulled up. This manual unrolling of the loop // decreases the number of hardware cycles between each read of the pin, // thus increasing sensitivity. uint8_t cycles = 17; if (*pin & bitmask) { cycles = 0;} else if (*pin & bitmask) { cycles = 1;} else if (*pin & bitmask) { cycles = 2;} else if (*pin & bitmask) { cycles = 3;} else if (*pin & bitmask) { cycles = 4;} else if (*pin & bitmask) { cycles = 5;} else if (*pin & bitmask) { cycles = 6;} else if (*pin & bitmask) { cycles = 7;} else if (*pin & bitmask) { cycles = 8;} else if (*pin & bitmask) { cycles = 9;} else if (*pin & bitmask) { cycles = 10;} else if (*pin & bitmask) { cycles = 11;} else if (*pin & bitmask) { cycles = 12;} else if (*pin & bitmask) { cycles = 13;} else if (*pin & bitmask) { cycles = 14;} else if (*pin & bitmask) { cycles = 15;} else if (*pin & bitmask) { cycles = 16;} // End of timing-critical section interrupts(); // Discharge the pin again by setting it low and output // It's important to leave the pins low if you want to // be able to touch more than 1 sensor at a time - if // the sensor is left pulled high, when you touch // two sensors, your body will transfer the charge between // sensors. *port &= ~(bitmask); *ddr |= bitmask; return cycles; }
// readCapacitivePin // Input: Arduino pin number // Output: A number, from 0 to 17 expressing // how much capacitance is on the pin // When you touch the pin, or whatever you have // attached to it, the number will get higher uint8_t readCapacitivePin(int pinToMeasure) { pinMode(pinToMeasure, OUTPUT); digitalWrite(pinToMeasure, LOW); delay(1); // Prevent the timer IRQ from disturbing our measurement noInterrupts(); // Make the pin an input with the internal pull-up on pinMode(pinToMeasure, INPUT_PULLUP); // Now see how long the pin to get pulled up. This manual unrolling of the loop // decreases the number of hardware cycles between each read of the pin, // thus increasing sensitivity. uint8_t cycles = 17; if (digitalRead(pinToMeasure)) { cycles = 0;} else if (digitalRead(pinToMeasure)) { cycles = 1;} else if (digitalRead(pinToMeasure)) { cycles = 2;} else if (digitalRead(pinToMeasure)) { cycles = 3;} else if (digitalRead(pinToMeasure)) { cycles = 4;} else if (digitalRead(pinToMeasure)) { cycles = 5;} else if (digitalRead(pinToMeasure)) { cycles = 6;} else if (digitalRead(pinToMeasure)) { cycles = 7;} else if (digitalRead(pinToMeasure)) { cycles = 8;} else if (digitalRead(pinToMeasure)) { cycles = 9;} else if (digitalRead(pinToMeasure)) { cycles = 10;} else if (digitalRead(pinToMeasure)) { cycles = 11;} else if (digitalRead(pinToMeasure)) { cycles = 12;} else if (digitalRead(pinToMeasure)) { cycles = 13;} else if (digitalRead(pinToMeasure)) { cycles = 14;} else if (digitalRead(pinToMeasure)) { cycles = 15;} else if (digitalRead(pinToMeasure)) { cycles = 16;} // End of timing-critical section interrupts(); // Discharge the pin again by setting it low and output // It's important to leave the pins low if you want to // be able to touch more than 1 sensor at a time - if // the sensor is left pulled high, when you touch // two sensors, your body will transfer the charge between // sensors. digitalWrite(pinToMeasure, LOW); pinMode(pinToMeasure, OUTPUT); return cycles; }
http://playground.arduino.cc/Code/CapacitiveSensor