Code Monkey home page Code Monkey logo

mars's Introduction

MARS Control Software

Warning

โš ๏ธ A good 30%, 50%, large amount of this documentation is out of date or just wrong..... It's being worked on..... - [Cal]

The code for the MARS payload.
This Readme should cover everything but if it dosn't then just yell at me... [Cal]

Install

Once you have cloned or downloaded the repo, setup the Arduino making any changes needed and then run the Upload script. This will download the correct libraries, make sure that the correct header files are created and upload the code to the Arduino. With some luck everything should just work.

๐Ÿ“” If you try and open main.ino then the Arduino IDE will may throw a hissy-fit and not want to work with you. Try if you like but it may break....

Usage

There are two main ways to make the Arduino rotate the filter plate in the sandwich; the Button and falling past an Altitude. By default both are enabled, and the specific altitudes that should trigger rotation are defined in payload_settings.h under FILTER_HEIGHTS. Other settings such as the apogee height can also be found in that file. See Calibration and Configuration for more information.

Setup

Calibration and Configuration

For ease of debugging and programming most variable and configuration options needed for deployment are in the payload_settings.h header file.

Operational Parameters

โš ๏ธ Currently if you enable ROTATE_ON_ALTITUDE then things will break.
๐Ÿ“” Remember once changes have been made to any of the files, you need to re-upload the code to the arduino.

Option Possible Values Explanation
APOGEE_HEIGHT Any integer In meters, what height should be considered to be the highest point of flight.
FILTER_HEIGHTS Array of integers When descending, at what heights (meters) should the filter plate be rotated. For example if there were two filters and one quarantine blank and the first filter is needed to be rotated into place at 40m, the second is then moved into place at 30 then the quarantine blank is moved back into place at 10m above the ground, then the array would look like this: {40, 30, 10}
ROTATE_ON_ALTITUDE true or false Should rotation events occur when descending.
ROTATE_ON_BUTTON true or false Should the button trigger a rotation event.
STEPS_PER_ROTATION Any integer How many stepper motor steps will are need to move a filter in position a -> b

Wiring Layout

๐Ÿ“” The LED shown to be connected to pin 13 is not technically needed due to it sharing the pin with the inbuilt LED...
๐Ÿ“” While a MicoSD-Card breakout board is shown in the diagram, any SD compatible board will work. (We use an el-cheapo regular SD-Card breakout board).
๐Ÿ“• The pin breakout on each board may differ but commonly DO = MISO = 50 and DI = MOSI = 51

If needed the see the sub-components data sheet for information regarding setup or use.

๐Ÿ“™ We may want to use this version of the transceiver as it has an RP-SMA 2.4GHz antenna connector on it

โ— Wiring Layout is out of date. It does not show the MPU6050 or nRF24L01+

Wiring Layout

Debugging

See [Warning]

At compile time, the pre-build python script "tool chain" will auto-magically* create a header file to add in a few useful things, but it will also ENABLE the debug logging to the arduino's serial port. By default the serial port speed is 115200 and if you need to change it, then change the SERIAL_BAUD option in main.ino to what ever speed you need.

Contributing to the codebase

See the Contributing file for info on how to setup the folder and make changes.

โ— Note: It is assumed you have read the Git and Install Commands sections.

Git

It is HIGHLY recommended you use git to clone the repo as code upload script was built to be able to auto-magically* download the latest version of the code. It would also allow for any changes in code made locally to be uploaded and synced, potentially* making debugging "easier". For more info on how to get git and use git check out the Git Beginner Tutorial done by GitHub.
* Due to the fundamental love<->hate relationship we mortals have with the debugging gods, auto-magic systems may not be cooperative at all times.

Install Commands

โš ๏ธ Important Note: Because computers, when you try to launch the upload script it may yell at you about "Execution Policies" or "Unauthorized Access" errors. This is normal, TL;DR its for security. If this does occur you need to open powershell as an administrator (search for it in the start-menu, then right click) and then run this Set-ExecutionPolicy RemoteSigned command (or equivalent) to allow scripts to be executed. Then you should be good to go!

git clone https://github.com/calw20/MARS-Prototype.git
cd MARS-Prototype
Upload.ps1

mars's People

Contributors

calw20 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.