This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* homodyne.ino: Homodyne detection of a 1 kHz signal. | |
* | |
* This program continuously samples analog input 0 and uses an homodyne | |
* detection scheme to identify a signal at 1 kHz (+/- 24 Hz @ -3dB). | |
* | |
* The analog-to-digital converter is set to "free running mode" and | |
* takes one sample every 104 us. The samples are multiplied by two | |
* generated signals at 1 kHz (the "local oscillator"), in quadrature to | |
* one another. The products are then low-pass filtered with a time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Simple printf for writing to an Arduino serial port. Allows specifying Serial..Serial3. | |
* | |
* const HardwareSerial&, the serial port to use (Serial..Serial3) | |
* const char* fmt, the formatting string followed by the data to be formatted | |
* | |
* int d = 65; | |
* float f = 123.4567; | |
* char* str = "Hello"; | |
* serial_printf(Serial, "<fmt>", d); |