-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raspberry Pi Pico support and organizational changes (#155)
<!-- Please Give Your PR a relevant title--> ## Description of Problem These changes encompass everything that was needed to support a new flight computer: Birdbrain. Birdbrain is roughly derived from Catalyst-2, but includes several hardware changes, including a new microcontroller, IMU, radio, SD card module and pyro channels. ## Notable Changes <!-- Describe your thought process and the steps you took to find a solution. If your process resulted in a new issue being created, link it here--> - replaced references to `Catalyst-2` with the new software name: `Stimulant` - Added a `sensors` directory with interfaces for some of the sensors - added source code for `LSMDSOX` - replaced `settings.h` with `config.h` and added a config for each supported flight computer (`Catalyst-2` and `Birdbrain`) - added build flags in `platformio.ini` to link source code - modified unit tests to "work" with the new architecture (further modification will be needed) ## Testing <!-- Describe the testing that you did to validate your changes (i.e. ran a unit test, loaded onto physical microcontroller etc.)--> <!-- ex: - Executed "throw test" on Catalyst to verify behavior --> - Flight tested with successful main parachute deploy (triggered by lack of drogue failsafe) (Birdbrain) - Ground "throw" tests (Birdbrain) closes #15
- Loading branch information
1 parent
f82891d
commit ee9173b
Showing
31 changed files
with
594 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/***************************************************************************** | ||
* This file is for any settings or constants that may be manually adjusted | ||
* specific to the Birdbrain flight computer | ||
****************************************************************************/ | ||
#pragma once | ||
|
||
//tick times (microseconds) | ||
constexpr uint32_t TICK_TIME_ONPAD = 10000; | ||
constexpr uint32_t TICK_TIME_ASCENDING = 10000; | ||
constexpr uint32_t TICK_TIME_DESCENDING = 50000; | ||
constexpr uint32_t TICK_TIME_POST_FLIGHT = 1000000; | ||
|
||
constexpr uint32_t GPS_WAIT_TIME = 900; //number of seconds to wait for GPS to acquire signal before moving on | ||
|
||
constexpr uint32_t RING_QUEUE_LENGTH = 1000;//each 100 elements is 1 seconds of data at 100hz | ||
|
||
// pin definitions | ||
constexpr int BMP_CS = 7; //SPI chipSelect of bmp altimeter | ||
constexpr int BUILTIN_SDCARD = 9; // SPI chipSelect of SD card | ||
constexpr int RADIO_CS = 8; //SPI chipSelect of radio module | ||
constexpr int IMU_CS = 6; //SPI chipSelect of IMU | ||
constexpr int SPI0_SCK = 2; //SPI clock pin | ||
constexpr int SPI0_MOSI = 3; //SPI MOSI pin | ||
constexpr int SPI0_MISO = 4; //SPI MISO pin | ||
constexpr int SPI1_SCK = 10; | ||
constexpr int SPI1_MOSI = 11; | ||
constexpr int SPI1_MISO = 12; | ||
constexpr int BUZZER_PIN = 26; | ||
constexpr int PYRO0_PIN = 14; | ||
constexpr int PYRO1_PIN = 15; | ||
|
||
constexpr int TONE_HZ = 2500; //frequency of buzzer tone | ||
|
||
#define GPSSerial Serial1 //Hardware Serial Location of GPS | ||
#define XBeeSerial Serial //Hardware Serial Location of XBee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/***************************************************************************** | ||
* This file is for any settings or constants that may be manually adjusted | ||
* not specific to any hardware architecture | ||
* all hardware specific settings should be in their own file | ||
* | ||
* all hardware architectures should be conditionally included here | ||
****************************************************************************/ | ||
#pragma once | ||
|
||
#ifdef UNIT_TEST | ||
#include "../test/lib/mock_arduino.h" | ||
#else | ||
#include <Arduino.h> | ||
#endif // UNIT_TEST | ||
|
||
#if defined(BIRDBRAIN) | ||
#include "config/birdbrain.h" | ||
#elif defined(CATALYST2) | ||
#include "config/catalyst2.h" | ||
#endif | ||
|
||
constexpr double MAIN_ALTITUDE = 200; //altitude to deploy main parachute at (meters) | ||
constexpr double G_FORCE_TO_LAUNCH = 2; //if acceleration exceeds this number the rocket will assume it has been launched | ||
constexpr double MAX_APOGEE_ACCEL = 1; //we can rule out apogee if acceleration is above this amount (Gs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.