Indigo Touch Radio Control Page with Dynamic Presets

Posted on
Fri Jan 14, 2011 9:00 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Indigo Touch Radio Control Page with Dynamic Presets

I made a little write up on how to create a page to control your radio. What's neat about it is that when you switch from AM to FM the station selection buttons automagically update, and it shows what station is currently selected. It's based on variables and presets so once set up, there is very little maintenance if you move, change order of stations etc. Below are a few pics to show the page in Indigo, and how it changes the display in Indigo Touch.

Here's the URL--it's in the hardware section. Hope you like it.
http://www.perceptiveautomation.com/filelib/index.php
Attachments
Page Setup Screenshot.jpg
Page Setup Screenshot.jpg (147.79 KiB) Viewed 2195 times
FM Screenshot.jpg
FM Screenshot.jpg (121.5 KiB) Viewed 2195 times
AM Screenshot.jpg
AM Screenshot.jpg (103.76 KiB) Viewed 2195 times

Posted on
Sat Jan 15, 2011 2:45 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Indigo Touch Radio Control Page with Dynamic Presets

**EDIT**
The zip file has now been updated with this info.


A couple of necessary additions until the documentation in the file can be updated. First, here's the code to populate the variables automatically:
Code: Select all
tell application "IndigoServer"
    set acount to 1
    repeat 10 times
        make new variable with properties {name:"WHA_AM_Preset_" & acount, value:acount}
        set acount to acount + 1
    end repeat
end tell

tell application "IndigoServer"
    set acount to 1
    repeat 10 times
        make new variable with properties {name:"WHA_FM_Preset_" & acount, value:acount}
        set acount to acount + 1
    end repeat
end tell

tell application "IndigoServer"
    set acount to 1
    repeat 10 times
        make new variable with properties {name:"WHA_Button_" & acount, value:acount}
        set acount to acount + 1
    end repeat
end tell

tell application "IndigoServer"
    make new variable with properties {name:"WHA_Radio_Display" & acount, value:acount}
    make new variable with properties {name:"WHA_Radio_Preset" & acount, value:acount}
    make new variable with properties {name:"WHA_Radio_AMFM" & acount, value:acount}
end tell


Second (and most important): the trigger that is set up to toggle the tuner between AM and FM needs a further action to switch the band on the tuner.

This trigger will fire when the "WHA_Radio_AMFM" variable changes. The condition is "always". The actions are TWO "execute applescript" and are separate. The first is the following:
Code: Select all
RemoteControl("Sony Tuner", "Sony/Tuner", "Band")

This will actually send the signal to the tuner to change the band.

The second is the control code listed in the write up. I am keeping them separate so that the code can be corrected in one of the trigger actions and simply copied/pasted into the other without having to worry about the toggle.

Posted on
Mon Jan 24, 2011 6:46 am
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Indigo Touch Radio Control Page with Dynamic Presets

BTW if anyone is interested in this Sony tuner, there is a great writeup on it here:

http://www.ham-radio.com/k6sti/xdr-f1hd.htm

This is measured data showing the excellent performance of this little box.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests