0

ADABOX007 SDR Tuning Knob
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

ADABOX007 SDR Tuning Knob

by ejb on Mon Apr 09, 2018 7:45 pm

I've completed the SDR tuning knob project (using CubicSDR on my Mac). It works but not quite the way I'd like it to. It seems to nudge the frequency up or down by very small increments. Even at full speed with the pot turned to maximum range it's only advances at a maximum rate of maybe around 1 KHz a second. It takes a long time to tune up and down the scale. How do I modify the CircuitPython code to run a bit faster, maybe at a maximum rate of 100 kHz/second?

ejb
 
Posts: 22
Joined: Tue Apr 19, 2011 10:01 pm

Re: ADABOX007 SDR Tuning Knob

by johnpark on Tue Apr 10, 2018 11:05 am

Hi -- take a look at the
Code: Select all | TOGGLE FULL SIZE
spamRate[]
list in the code on line 38. The times there are the delay between key presses. Try making those values smaller to increase the rate at which the board "spams" the keys.

I'm not sure what the maximum rate is at which the hid.keyboard library will allow a key to be pressed, but at some point you'll reach that maximum. I'm going to look deeper into this to see if that's anything we can adjust.

-John

johnpark
 
Posts: 186
Joined: Wed Mar 25, 2009 2:15 pm

Re: ADABOX007 SDR Tuning Knob

by ejb on Tue Apr 10, 2018 11:32 am

Thanks John for your reply. I'll try experimenting with the rate in the code. Ideally the spam key function would work at whatever point the cursor is placed. Then I could just set it at a spot higher up on the frequency readout. But that doesn't seem to happen. No matter where I position the cursor, only the lowest digits are affected. The only other way I can control which digits change on my Mac is to set the cursor on the particular digit I want to change, say the 1 MHz spot, and then use my touch pad to increment up or down. I suspect that the hid.keyboard library doesn't have the ability to spam the touch pad. But, maybe there's some other key other then "[" or "]" that would work?

ejb
 
Posts: 22
Joined: Tue Apr 19, 2011 10:01 pm

Re: ADABOX007 SDR Tuning Knob

by johnpark on Tue Apr 10, 2018 11:38 am

Ah, I see -- yes, the limitation here seems to be which functions CubicSDR has mapped to keyboard shortcuts. The fine tuning area is where the '[' and ']' keys work -- I didn't find any way to tune the larger numbers of the frequency with key commands either.

You can use the
Code: Select all | TOGGLE FULL SIZE
adafruit_hid.mouse
library to trigger the mouse button, scroll wheel, and cursor position, in case that inspires you to try a different method!

Best,
John

johnpark
 
Posts: 186
Joined: Wed Mar 25, 2009 2:15 pm

Re: ADABOX007 SDR Tuning Knob

by stephenbrough on Sun Apr 15, 2018 12:47 am

I happened upon the docs for Cubic SDR. If you right click (or two finger tap on a Mac or other laptop setup to use two finger tap as right click) on the value you want to increment, it'll outline it in red and further adjustments to the pot will adjust that number. So you can right click on one of the higher values to adjust it instead of the lower ones.

stephenbrough
 
Posts: 1
Joined: Sun Apr 08, 2018 2:32 pm

Re: ADABOX007 SDR Tuning Knob

by johnpark on Sun Apr 15, 2018 11:53 am

That's terrific, Stephen, thanks for the tip! I'll give that a try.
Best,
John

johnpark
 
Posts: 186
Joined: Wed Mar 25, 2009 2:15 pm

Re: ADABOX007 SDR Tuning Knob

by ejb on Fri Apr 27, 2018 8:49 pm

Thanks Stephen, <control> <finger tap> works just fine on my older MacBook Pro. Brilliant! Love it!

ejb
 
Posts: 22
Joined: Tue Apr 19, 2011 10:01 pm

Please be positive and constructive with your questions and comments.