ADABOX007 SDR Tuning Knob
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- ejb
- Posts: 38
- Joined: Tue Apr 19, 2011 10:01 pm
ADABOX007 SDR Tuning Knob
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?
- johnpark
- Posts: 985
- Joined: Wed Mar 25, 2009 2:15 pm
Re: ADABOX007 SDR Tuning Knob
Hi -- take a look at the 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
Code: Select all
spamRate[]
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
- ejb
- Posts: 38
- Joined: Tue Apr 19, 2011 10:01 pm
Re: ADABOX007 SDR Tuning Knob
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?
- johnpark
- Posts: 985
- Joined: Wed Mar 25, 2009 2:15 pm
Re: ADABOX007 SDR Tuning Knob
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 library to trigger the mouse button, scroll wheel, and cursor position, in case that inspires you to try a different method!
Best,
John
You can use the
Code: Select all
adafruit_hid.mouse
Best,
John
- stephenbrough
- Posts: 1
- Joined: Sun Apr 08, 2018 2:32 pm
Re: ADABOX007 SDR Tuning Knob
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.
- johnpark
- Posts: 985
- Joined: Wed Mar 25, 2009 2:15 pm
Re: ADABOX007 SDR Tuning Knob
That's terrific, Stephen, thanks for the tip! I'll give that a try.
Best,
John
Best,
John
- ejb
- Posts: 38
- Joined: Tue Apr 19, 2011 10:01 pm
Re: ADABOX007 SDR Tuning Knob
Thanks Stephen, <control> <finger tap> works just fine on my older MacBook Pro. Brilliant! Love it!
Please be positive and constructive with your questions and comments.