#Help with vfo code and display
1 messages · Page 1 of 1 (latest)
we managed to regenerate code using gpio and not digital pins
but the import gpio what should it be
this one has the gp pins set correctly
Traceback (most recent call last):
File "code.py", line 4, in <module>
ImportError: no module named 'gpio'
Traceback (most recent call last):
File "code.py", line 12, in <module>
ValueError: GP10 in use
this looks to be a busio lib issue
What software and hardware are you using? is this Circuitpython or Micropython?
It looks like circuitpython libraries, but you're crossing some Linux python into your code with the gpio.
I also see an interrupt service routine, which seems odd considering circuitpython does not support interrupts.
CircutPy and a raspi pico
CTRL-D to reloadis on the screen
but I dont get the gp10 issue
I can post the latest I was testing to try and figure out the issue
as I was going through trying to find out the pin but I think its a lib issue
it must have to have a export spi in it somewhere
gotten further
Traceback (most recent call last):
File "code.py", line 25, in <module>
RuntimeError: No pull up found on SDA or SCL; check your wiring
Pi Pico does not have a board.I2C() you'll need to define it with busio.I2C().
#USE for I2C
SCL = board.GP5
SDA = board.GP4
Setup I2C for Si5351
i2c = busio.I2C(SCL, SDA)
si5351 = adafruit_si5351.SI5351(i2c)
Traceback (most recent call last):
File "code.py", line 29, in <module>
RuntimeError: No pull up found on SDA or SCL; check your wiring
I figure its complaining as I dont have the si5351 connected at the min
Without a device or pullup resistors connected, the I2C bus won't initialize.
ok
well as the disple covers the pins its hard connect
I will have to wit till the new screen gets here
displayio.release_displays() fixed the gp10 issue
so we are closer
got further
took screen off and put the si5351
NameError: name 'gpio' is not defined
so what is used insted of gpio
enc_switch = gpio.InputPin(ENC_SWITCH)
enc_a = gpio.InputPin(ENC_A)
enc_b = gpio.InputPin(ENC_B)
rit_enc_a = gpio.InputPin(RIT_ENC_A)
rit_enc_b = gpio.InputPin(RIT_ENC_B)
rit_enc_btn = gpio.InputPin(RIT_ENC_BTN)
step_switch = gpio.InputPin(STEP_SWITCH)
memory_save_btn = gpio.InputPin(MEMORY_SAVE_BTN)
memory_recall_btn = gpio.InputPin(MEMORY_RECALL_BTN)
Wherever the guides use Dxx, replace with GPxx. It's a quirk of the RP2040.
ok now this is confusing
man rotoryio wont work with the pico this sucks
ok got that but now next issue
TypeError: data_pin must be of type Pin, not NoneType
audio_in = audiobusio.PDMIn(MIC_PIN, None)
working to get audio in and out over usb
getting closer but now lost in this issue
diabled the usb sound for now
but not getting further
in a loop
might be its not seeing display as its unplugged as I needed to open the pins
ok I am closer to have things working with diff display but having issues
Traceback (most recent call last):
File "code.py", line 26, in <module>
AttributeError: .show(x) removed. Use .root_group = x
using the st7735 spi display
raspi pico
Traceback (most recent call last):
File "code.py", line 37, in <module>
RuntimeError: No pull up found on SDA or SCL; check your wiring
but they are wird up
ok so we started fresh today and its seems to work but nothing on display
and no erros on the serial console
Code stopped by auto-reload. Reloading soon.
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
no errors but no output
checking screen wireup now
got it working. but now to make it look better
it was the pin out 2 pins in the wrong place
ok we have working code but having 2 issues rit is not applying to the freq on the last 2 numbers and the steps are not working
morning
so we managed to fix the rit to work correctly but now having issues with the freq encoder
ok got it
man what a pain
and have a simulated s meter for now
but I have to find how to store and recall current freq and to store and recall memories either to nvm or epprom
it shows mem slot 1 but I need it to display the freq in that slot or say empty.
and how to add some static memories.
so I have 99% of code working . but how to store the current freq and recall if power off and back on
current code. memory function not working.
documented code.
need help also mapping the black screen is no use in so long time out
the smeter function also might need work
ok adding in a nvm storage setting and recall for power on and off but now just a white screen