#2m-6m-radio-code

1 messages ยท Page 1 of 1 (latest)

thorn rain
#

looking for help with building a 2m 6m basic interface.

#

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

silk smelt
#

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.

thorn rain
#

raspi pico

silk smelt
#

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.

thorn rain
#

and currenlty on the display we haveits not displaying

#

post code 1 min

#

as I am new to circuitpython I am going on what I am reading

silk smelt
#

Are you getting any erro messages at the REPL?

thorn rain
#

at the serial console now

#

but not seeing any error reported

#

I need to read more on gettting logs and reports

silk smelt
#

It might be best to just try one piece at a time -- try just getting the display to work. then add more

thorn rain
#

ok

silk smelt
#

If you are using main.py, remove the code .py

thorn rain
#

I just did

silk smelt
#

I have to check on which is used first, but if it report "Hello World" the the main.py is not getting executed

thorn rain
#

no errors on the console

#

code.py output:
Traceback (most recent call last):
File "code.py", line 8, in <module>
ImportError: no module named 'adafruit_ssd1306'

#

so I have to get the lib

#

where to find the python libs

silk smelt
thorn rain
#

so just cp them into the lib dir

silk smelt
thorn rain
#

ok

silk smelt
thorn rain
#

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

silk smelt
#

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.

thorn rain
#

Traceback (most recent call last):
File "code.py", line 11, in <module>
AttributeError: 'module' object has no attribute 'SCL'

silk smelt
#

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?

thorn rain
#

for the si5351 and the display

silk smelt
#

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?

thorn rain
#

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

silk smelt
#

That can't work with a PICO -- there are no Dx pins -- use GPxx

silk smelt
#

also using the correct pins will help ๐Ÿ˜‰

thorn rain
#

it seems all the pins need changed

silk smelt
#

yes

#

Taht appears to be an SSD1305, not SSD1306, correct?

thorn rain
#

its a 1305

#

its a 1306 sorry

#

gp7 and gp6

silk smelt
thorn rain
#

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

silk smelt
thorn rain
#

Iwas told it was i2c it muct be a spi

#

so now I have to figure that out

silk smelt
#

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

thorn rain
#

closer why they used digital pins I dont know

thorn rain
#

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

thorn rain
#

so I have 99% of code working . but how to store the current freq and recall if power off and back on