Skip to content

Commit 04a6220

Browse files
authored
Merge pull request #5 from DavidUniack/main
S-Band Radio Tests!
2 parents 40d3470 + 85416f7 commit 04a6220

5 files changed

Lines changed: 45 additions & 12 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PYSQUARED_VERSION ?= v2.0.0-alpha-25w29
1+
PYSQUARED_VERSION ?=mike-dev
22
PYSQUARED ?= git+https://github.com/proveskit/pysquared@$(PYSQUARED_VERSION)
33
BOARD_MOUNT_POINT ?= ""
44
BOARD_TTY_PORT ?= ""

config.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"cubesat_name": "Orpheus",
55
"current_draw": 240.5,
66
"debug": true,
7+
"degraded_battery_voltage": 7.0,
78
"detumble_enable_x": true,
89
"detumble_enable_y": true,
910
"detumble_enable_z": true,
@@ -17,7 +18,7 @@
1718
],
1819
"jokes": [
1920
"Hey it is pretty cold up here, did someone forget to pay the electric bill?",
20-
"sudo rf - rf*",
21+
"sudo rm - rf*",
2122
"Why did the astronaut break up with his girlfriend? He needed space.",
2223
"Why did the sun go to school? To get a little brighter.",
2324
"why is the mall called the mall? because instead of going to one store you go to them all",
@@ -39,12 +40,12 @@
3940
"What are computers favorite snacks? Chips!",
4041
"Wait! I think I see a White 2019 Subaru Crosstrek 2.0i Premium",
4142
"IS THAT A SUPRA?!",
42-
"Finally escpaed the LA Traffic",
43+
"Finally escaped the LA Traffic",
4344
"My CubeSat is really good at jokes, but its delivery is always delayed.",
4445
"exec order 66",
4546
"I had a joke about UDP, but I am not sure if you'd get it.",
4647
"I am not saying FSK modulation is the best way to send jokes, but at least it is never monotone!",
47-
"I am sorry David, I am afrain I can not do that.",
48+
"I am sorry David, I am afraid I can not do that.",
4849
"My memory is volatile like RAM, so it only makes sense that I forget things.",
4950
"Imagine it gets stuck and just keeps repeating this joke every 2 mins",
5051
"Check Engine: Error Code 404: Joke Not Found",
@@ -65,7 +66,7 @@
6566
"modulation_type": 0,
6667
"node_address": 1
6768
},
68-
"license": "",
69+
"license": "KO6FDY",
6970
"lora": {
7071
"ack_delay": 0.2,
7172
"coding_rate": 8,

src/flight-software/repl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from lib.adafruit_veml7700 import VEML7700 # This is Hacky V5a Devel Stuff###
2525

2626
# from lib.pysquared.Big_Data import AllFaces ### This is Hacky V5a Devel Stuff###
27+
from lib.proveskit_rp2350_v5b.register import Register
2728
from lib.pysquared.beacon import Beacon
2829
from lib.pysquared.cdh import CommandDataHandler
2930
from lib.pysquared.config.config import Config
@@ -117,7 +118,7 @@
117118
logger,
118119
uhf_radio,
119120
config.radio.license,
120-
Counter(2),
121+
Counter(Register.message_count),
121122
0.2,
122123
)
123124

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
adafruit-circuitpython-asyncio @ git+https://github.com/adafruit/adafruit_circuitpython_asyncio@1.3.3
22
adafruit-circuitpython-rfm==1.0.3
3+
proves-circuitpython-sx1280 @ git+https://github.com/proveskit/CircuitPython_SX1280@1.0.3
34
adafruit-circuitpython-ticks==1.1.1
4-
proveskit-ground-station @ git+https://github.com/proveskit/circuitpython_ground_station@0.0.1
5+
proveskit-ground-station @ git+https://github.com/proveskit/circuitpython_ground_station@david-dev

src/ground-station/repl.py

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from lib.pysquared.hardware.busio import _spi_init
88
from lib.pysquared.hardware.digitalio import initialize_pin
99
from lib.pysquared.hardware.radio.manager.rfm9x import RFM9xManager
10+
from lib.pysquared.hardware.radio.manager.sx1280 import SX1280Manager
1011
from lib.pysquared.hardware.radio.packetizer.packet_manager import PacketManager
1112
from lib.pysquared.logger import Logger
1213
from lib.pysquared.nvm.counter import Counter
@@ -24,14 +25,43 @@
2425
board.SPI0_MISO,
2526
)
2627

27-
radio = RFM9xManager(
28+
spi1 = _spi_init(
2829
logger,
29-
config.radio,
30-
spi0,
31-
initialize_pin(logger, board.SPI0_CS0, digitalio.Direction.OUTPUT, True),
32-
initialize_pin(logger, board.RF1_RST, digitalio.Direction.OUTPUT, True),
30+
board.SPI1_SCK,
31+
board.SPI1_MOSI,
32+
board.SPI1_MISO,
3333
)
3434

35+
print("Please select which radio you wish to use...")
36+
print("1 for UHF or 2 for S-Band")
37+
38+
selection = input()
39+
40+
if selection == "1":
41+
radio = RFM9xManager(
42+
logger,
43+
config.radio,
44+
spi0,
45+
initialize_pin(logger, board.SPI0_CS0, digitalio.Direction.OUTPUT, True),
46+
initialize_pin(logger, board.RF1_RST, digitalio.Direction.OUTPUT, True),
47+
)
48+
elif selection == "2":
49+
radio = SX1280Manager(
50+
logger,
51+
config.radio,
52+
spi1,
53+
initialize_pin(logger, board.SPI1_CS0, digitalio.Direction.OUTPUT, True),
54+
initialize_pin(logger, board.RF2_RST, digitalio.Direction.OUTPUT, True),
55+
initialize_pin(logger, board.RF2_IO0, digitalio.Direction.OUTPUT, True),
56+
2.4,
57+
initialize_pin(logger, board.RF2_TX_EN, digitalio.Direction.OUTPUT, False),
58+
initialize_pin(logger, board.RF2_RX_EN, digitalio.Direction.OUTPUT, False),
59+
)
60+
61+
else:
62+
print("Invalid selection. Exiting.")
63+
exit()
64+
3565
packet_manager = PacketManager(
3666
logger,
3767
radio,

0 commit comments

Comments
 (0)