This code/sketch makes DTV transmitter antenna finding easy. This code drives a bipolar stepper motor to point a DTV antenna towards a DTV transmitter antenna locations based on a premade channel list. A list of channels in the United States and corresponding angles relative to your location can be found on a number of sites such as AntennaWeb and the on the FCC website.
The stepper motor that turns the antenna is connected to the Arduino/Genuino board via a A4988 motor driver that is connected to pins 3-5 of the Arduino/Genuin. Communication with the Arduino can be done via an HM-10 Bluetooth board. A Bluetooth Termainal application will be needed to communicate with the HM-10 Bluetooth board. When a 0 is entered at the Bluetooth Terminal app’s prompt, the Arduino/Genuino decrement through the list of channels in the myChannelNum array. When a 1 is entered in the Bluetooth Terminal app’s prompt, the Arduino/Genuino increment through channels listed in the same array via. Based on the channel selected from the list, the motor will turn your antenna to the corresponding angle in the myChannelDegAngle array.