help creating external control buttons / tuner / volume / mode / band

159 views
Skip to first unread message

James Preece

unread,
Jun 7, 2017, 9:01:33 AM6/7/17
to Gqrx SDR
Hello,

I'm wondering how practical it would be to somehow read data from the GPIO pins on a raspberry pi (3) attached to an external tuning knob (so you physically turn the knob and the frequency changes).
Would it also be possible to write code to have buttons change mode and even band?

I'm trying to put together a boxed receiver using a pi gqrx and air-spy / fc dongle and having it battery powered for field use.

so having some external control knobs would be fantastic and very useful.

Thanks for any help on this

best 73

James / WO2I / M0JFP


Gregory Fenton

unread,
Jun 7, 2017, 9:35:39 AM6/7/17
to gq...@googlegroups.com
Sounds like a fun project.

My first instinct would be yes with a little patching of the sources this would be quite doable.

Something along the lines of
if(wheelforward) freq+=freqstep;
else if(wheelback) freq-=freqstep;

This is just pseudocode but have a look in the source the should already be code to jump by the frequency step, that is where you would patch.

As to the buttons and volume, same principal. Check where the volume etc gets changed and call that part when the gpio changes.

Have fun and keep us informed

Greg


--
You received this message because you are subscribed to the Google Groups "Gqrx SDR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gqrx+unsubscribe@googlegroups.com.
To post to this group, send email to gq...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gqrx/cd9e6538-3061-47e2-8a8c-e0c111a6f6f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Simon Kennedy

unread,
Jun 7, 2017, 11:37:40 AM6/7/17
to gq...@googlegroups.com
Hi James,

perfectly feasible. I'd use a push to click rotary encoder for the tuning control so you can you the push to click action to change mode, band, tuning speed or whatever and the normal turning action to tune up and down. 

Rather than hack into gqrx source code though I would use the Hamlib type remote control interface, much like I have done with my program to keep a rig and gqrx in sync: https://github.com/g0fcu/gqrx-hamlib-gui

Feel free to copy and hack my code. Integrating a rotary encoder should not be difficult. I haven't done so with a RPi but have with an STM32 microcontroller board and it really isn't difficult if you copy/paste from one of the many examples that (probably) exist on the Internet.

73 Simon
G0FCU.

Reply all
Reply to author
Forward
0 new messages