#2m-6m-radio-code
1 messages ยท Page 1 of 1 (latest)
I have some basic code but need to get it working with adifruit_si5351.py for 2m to start
here is the basic code I have
updated version
What problems are you having? Are you getting error messages? What microcontroller boards are you using. The more information you provide, the easier it is for people to help.
raspi pico
You appear to be using several pins for more than one thing ```display_bus = displayio.FourWire(spi, command=board.D8, chip_select=board.D10, reset=board.D9)
display = adafruit_ili9341.ILI9341(display_bus, width=320, height=240)
Setup I2C for Si5351
i2c = busio.I2C(board.SCL, board.SDA)
si5351 = adafruit_si5351.SI5351(i2c)
Define pins
ENC_A = board.D8
ENC_B = board.D7
ENC_SWITCH = board.D6
STEP_SWITCH = board.D5
RIT_ENC_A = board.D10
RIT_ENC_B = board.D9
RIT_ENC_BTN = board.D11``` D8,D9, D10 are used in two places.
and currenlty on the display we haveits not displaying
post code 1 min
this is the current version with the display we have inhand
as I am new to circuitpython I am going on what I am reading
Are you getting any erro messages at the REPL?
at the serial console now
but not seeing any error reported
I need to read more on gettting logs and reports
It might be best to just try one piece at a time -- try just getting the display to work. then add more
I just did
I have to check on which is used first, but if it report "Hello World" the the main.py is not getting executed
they are in the "bundle" see https://circuitpython.org/libraries
so just cp them into the lib dir
You may want to review this guide https://learn.adafruit.com/welcome-to-circuitpython
ok
essentially -- yes
doing it now
the hard part is having 2 weeks to prove this project. we have a board. but they based it on the si570 and there is no libs
Good luck!
You have a lot going on in your code. I suggest working on one piece at a time then combine them. You may get help from different people for different parts.
Traceback (most recent call last):
File "code.py", line 11, in <module>
AttributeError: 'module' object has no attribute 'SCL'
The is no "predefined" SCL/SDA pin for the pico -- you have tell it what GPxx pin your are using for SCL/SDA
I don't see where that Line 11 is that is using SCL?
for the si5351 and the display
you are using GP5 and GP4 -- where does it refer to SCL?
i2c = busio.I2C(board.GP5, board.GP4)```
you posted two sets of code -- which one are you using?
this is the current code
Traceback (most recent call last):
File "code.py", line 11, in <module>
RuntimeError: No pull up found on SDA or SCL; check your wiring
its wrong pins
i need to get the pins for the display
That can't work with a PICO -- there are no Dx pins -- use GPxx
also using the correct pins will help ๐
it seems all the pins need changed
the adafruit_ssd1306 library is not meant for use with displayio. https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306/
There is a non-displayio verions also https://github.com/adafruit/Adafruit_CircuitPython_SSD1306/ but you apear to be using displayio
I rm it
Traceback (most recent call last):
File "code.py", line 10, in <module>
RuntimeError: No pull up found on SDA or SCL; check your wiring
I replaced the lib
all the pins they set are wrong I will have to change
but I am reading the page you posted for review
according to https://www.waveshare.com/wiki/Pico-OLED-2.23 -- the default is to use SPI, did you configure it for I2C ?
Since none of the problems you are having at this point are "radio" related, you may find more general help in #help-with-projects as you try to get each piece working. In general you should not "cross-post" to more that one channel, but you may find a broader audience there. I first suggested #help-with radio since I thought you were looking for radio-speciic help. Once you have the board and pins straightend out, I suggest posting in #help-with-projects with more questions
closer why they used digital pins I dont know
pic of what I have done
smeter function needs work and a few small items but the freq works rit works step works but needs button wired up for testing
once you get the gist of circuitpy its really easy
I also have to work on the audio in and out
so I have 99% of code working . but how to store the current freq and recall if power off and back on