This is an old revision of the document!
List of components:
Pin connections:
External libraries used:
Lab concepts used:
Arduino GPIO configuration:
Synopsis: A button is pressed to toggle the frequency selection. While in frequency selection mode, the ADC is continuously running and reading values from a voltage divider containing a potentiometer (knob), while the LCD is displaying the current selected value (read from the ADC on interrupts) and the transmitter is playing on the previous established frequency. While not selecting, the ADC is turned off in order to save energy, and the transmitter is playing on the established frequency (selected when the mode changes), while the LCD displays it.
On setup, several registers are configured:
Then, using library calls, LCD and FM transmitter are set up. A default transmitting Frequency of 90.0Hz is set, and the region is EUROPE.
Two interrupt handlers are set up, INT0 and ADC:
The main execution loop converts the ADC raw value into a transmitting frequency (between 87.5MHz and 108MHz) and displays it on the screen if in selection mode.