Editing Pages

We've shown you how to add an entire new page with new rows of commands. It might be easier to edit an existing page of commands. For example if you have a cable or satellite box or DVR you might want to edit my cable page if you happen to like the layout. You can keep the same symbols that I use or edit some that may be different on your device. Then substitute in your own IR commands and protocols.

You could also completely remove an entire page. For example you might want to remove the page for my Sony amplifier surround sound system. You basically just reverse the steps that we used to add a page. Everywhere that we told you to put in a new number or new rows of items you would just delete the old rows. Note that you will have to re-number all of the rows. For example the amp occupies three rows titled ROW_AMP_1 9 through ROW_AMP_3 11. If you remove those three rows then you should renumber ROW_TV_1 which was 12 and make it 9. And then continue to renumber every row below that in the entire array.

Special Commands

Of the four parameters in each command, the final one is a flag for special handling. We already showed you how to use the SPL_CHANGE_PAGE special flag. The remaining types of special commands are defined in the main tab of the program at approximately line 114 as follows.

//Types of special commands stored in Current.Special
#define SPL_QUIT    1
#define SPL_REC     2
#define SPL_GOTO_RIGHT 3
#define SPL_GOTO_DOWN 4
#define SPL_GOTO_TVAR 5
#define SPL_HOLD 7
#define SPL_KB_SHIFT 8

We already discussed how the Quit command worked on the opening page. The SPL_QUIT flag initiates that. Also we mentioned that when you select a RECORD function it causes a pop-up screen to ask "Are You Sure?". That is handled by SPL_REC.

The next three SPL_GOTO flags transmits the signal that you've selected but then it automatically moves your cursor to a different location on the screen. We implemented this feature because we noticed that when selecting a function such as Menu the very next thing you want to do is move to the arrow keys to navigate the menu. Similarly the on-screen guide you want to jump to the arrow keys. You can look at the code in the main tab at approximately line 197 and find the function do_Special(void) to see how these work.

The flag SPL_HOLD causes the same IR function to be retransmitted for a couple of seconds. Unlike cable box there are certain functions such as a jump forward 15 minutes that can only be attained by holding the fast for one full second. This special flag implements that. This feature is unique to my particular cable DVR and if you need to implement something similar it might require some extra code in the do_Special() function of the main tab. 

Finally the SPL_KB_SHIFT flag is used by the full keyboard screen. It already works and you will not likely need it anywhere else so we will not trouble you with the details.

Optional Features

There are three features that you can turn off or on and recompile and upload the program. We've already mentioned a couple of them but we will review them all here. On the main tab of the program at the very top just below the opening comments you will see the following three lines:

#define MY_DEBUG 0
#define USE_BLE 1

Changing the first value from 0 to 1 turns on debugging messages and the serial monitor. You will have to have the serial monitor open or the program will not initialize.

Changing the second line from 1 to 0 turns off all of the Bluetooth functions. If you are not using the ultimate remote for iOS switch control you would not need a Bluetooth processor board such as the Feather M0 BLE. You could substitute a different Feather board such as a Feather M4. The Bluetooth symbol will still appear on the top row of your screen but selecting it will do nothing.

Changing the third value from 1 to 0 will deactivate the touchscreen feature. You may not need it and it may be annoying if you accidentally touch the screen at the wrong time.

Other Modifications

We've tried to organize the code in a logical manner and split it up into various tabs to make things as simple as possible. The code is well commented throughout. All of the changes necessary to add or remove pages of commands or to edit commands are all in the file my_pages.h so except for the definitions we just mentioned above. You probably will never need to edit any of the other files. If you want to control the device using something other than 3 AT switches, all of the code for those switches is in my_inputs.h. You would have to implement new code in that section to read different types of devices such as flex sensors, force sensitive resistors, sip-and-puff devices etc. That portion of the code is well commented. If you need assistance with such modifications feel free to contact us and we will try to help as best we can.

This guide was first published on Sep 23, 2019. It was last updated on Mar 08, 2024.

This page (Additional Configuration) was last updated on Mar 08, 2024.

Text editor powered by tinymce.