-
Notifications
You must be signed in to change notification settings - Fork 0
Satellite Software
- Can't read from the IMU:
As suggested try changing the address from
0x69
to0x68
in line 131 oflib/pycubedmini.py
self.IMU = bmx160.BMX160_I2C(self.i2c1,address=0x69)
PyCubed Beep-Sat Basic Guide can be found here.
Download the latest Beep-Sat code from its GitHub Repo. Either download the zip or if you're familiar with git, fork & clone the repo.
(Optional) With your PyCubed board plugged into your computer, backup your PYCUBED drive by copying its contents to a directory on your computer.
Copy the files from /software_example_beepsat/basic/
to your PYCUBED
drive, overwriting any files when prompted.
PyCubedMini Specific Instructions
- Copy the files from the most recent
flight-software lib
directory to yourPYCUBED
driver, overwriting any files when prompted. - Change the import statement
from pycubed import cubesat
tofrom pycubedmini import pocketqube as cubesat
. This ensures that you are importing the correctSatellite
object frompycubedmini.py
. - Look at the first bullet point under troubleshooting if applicable.
Open a serial terminal.
PyCubedMini Specific Instructions
-
At this point, you should get error messages on your terminal telling you that certain attributes being accessed by
Tasks
do not exist for yourSatellite
object. This is because there are a lot of initializations done on thepycubed.py Satellite
object that are not part of thepycubedmini.py
file. In order to fix this: -
Copy the following lines (taken from the
__init__
function inpycubed.py
) into the__init__
function inpycubedmini.py
:self.data_cache={} self.filenumbers={} self.vlowbatt=6.0 self.debug=True
-
Save and observe the output as the beep-sat conducts its mission.
After observing the output in the terminal for a few moments, start working through understanding each task by stepping through the code breakdown discussion (below) while opening and playing with its respective file in /Tasks/task_filename.py.
Details on the blink_task.py
file can be found at this link.
Details on the imu_task.py
file can be found at this link.
Details on the battery_task.py
file can be found at this link.
Details on the time_task.py
file can be found at this link.
Due to differences between the PyCubed and PyCubedMini boards, we must make some alterations to the beacon_task.py
and pycubed_rfm9x.py
files.
- Note: the
pycubed_rfm9x.py
file is the version taken from the most recentflight-software lib
directory, NOT the version in the Beep-Sat code GitHub Repo. Necessary Changes:
-
In the
beacon_task.py
file, change all references toradio1
toradio
. The PyCubedMini library's version of theSatellite
class has no field namedradio1
, and rather refers to the radio attached on the board asradio
. -
Copy and paste the below function
await_rx
after the functionrx_done
(line 629) in theRFM9x
class of filebeacon_task.py
:async def await_rx(self,timeout=60):
_t=time.monotonic()+timeout while not self.rx_done(): if time.monotonic() < _t: yield else: # Timed out return False # Received something return True
Details on the beacon_task.py
file can be found at this link.
- Can't read from the IMU:
As suggested try changing the address from
0x69
to0x68
in line 131 oflib/pycubedmini.py
self.IMU = bmx160.BMX160_I2C(self.i2c1,address=0x69)