Introduction: LIRC - LabVIEW - Recording Remote Profile
This instructable will walk you through the recording LabVIEW VI I made for my LIRCRaspberry Pi Universal remote. This VI provides a graphical user interface to help you record your remotes profile. The Record VI allows you to create remote profiles for remotes that can't be found in the LIRC database. It also allows you to edit remote profiles. Users can delete, edit, and add to a remote's buttons or you can just delete the remote all together. This is only one of six instructable in my LIRC instructable collection, I recommend that you start by reading my LIRC overview instructable.
Step 1: User Interface
When you start the VI you are asked to select one of the three selectable actions. The first action is "Create New Remote file," select this action if this is the first remote profile that you have created or if you want to start fresh. This option will overwrite the current remote profile.
The next action is "Add New Remote to file," select this action when you have an existing config file that you want to add to. This option will not overwrite your current remote profile. Instead, it will add a new remote to it. Once you select one of these two options, you press start to move to the next step which is the same for each one.
First fill in the "Remote name," the name you enter here will be used to identify this remote profile in the future. Next select the button that you want to program from the "Buttons" drop down menu, once you have the button selected select the "program" button before you press that button while pointing your remote towards IR receiver. If the button isn't received the "Retry" button will light up which means you need to try again. If it does work the buttons name will appear underneath the name of your remote in an indicator on the right side.
The third action is "Edit Current Remotes," select this action when you want to modify one of your existing remote profiles. Press the "Start" button after you select this action and a new "Action" drop down will take its place.
The first action is "Delete Remote," this option will allow you to delete one of the remote profiles you have created without having to delete the config file. Once this action it selected you just need to select the remote you want to delete and then press select to delete this remotes profile. The next action "Delete Button," is very similar. The difference is you are deleting a remote's button instead of the whole remote.
The next action is "Edit Button," this option will allow you to edit one of the buttons that you have already programmed. Once this action has been selected find the remote with the button you want to edit in the "Remote" dropdown and then press the Select button. You will then select the button that you want to edit in the "Buttons" drop down menu once you have the button selected select the "program" button before you press that button while pointing your remote towards IR receiver. If the button isn't received the "Retry" button will light up which means you need to try again, once it is received correctly you will return to the start menu.
The next action is "Add Button," this option will allow you to add buttons to existing remote profiles. The steps for adding a button are the same as the steps for editing a button except that the "Button" drop down menu will contain a list of all possible buttons instead of a list of the buttons that have already been programmed.
Step 2: LabVIEW Block Diagram
To control LIRC running on the Raspberry Pi from the chroot I used a system exec VI to send commands over SSH. Every command started with "ssh pi@localhost," the commands were entered as strings into the system execs "command line."
I use a special command to record the IR values (shown below). The values are recorded in pulse and pause times.
The Raw values are tested to make sure enough information was received. One of three tests is shown below, this part is testing to make sure that the first 2 values are larger than the other values.
Once the data has been checked it can be converted into hex and formatted into a config file (shown below).
To make the front panel run smoothly I have a case structure running in a while loop outside of the rest of the code. This allows me to change the value and visibility of each of the buttons throughout.
Step 3: The End
Thank you for reading my instructable, if you are interested in making this project yourself but don't have the right supplies you can purchase the LabVIEW computing kit for the Raspberry Pi 2 . This kit includes a copy of LabVIEW 2014 home edition and everything you will need to run LINX 3.0 and start making projects. Please comment with any questions or comments you may have.