Skip to content

Instantly share code, notes, and snippets.

View brian-kiplagat's full-sized avatar

Brian Kiplagat brian-kiplagat

View GitHub Profile
/*This arduino controls orientation...it is always on standby and is only activated by the master arduino
immedietly the rocket starts to free fall.the function of this is to make sure the
rocket is always on the right way up for effective landing.This is also resposible for deploying the parachute
THIS SYSTEM IS ON THE I2C BUS HENCE IS A SLAVE
Depending on the fall acceleration the microcontroller can trigger master to fire to reduce speed
Has a unique adress to identify it from all other devices on the bus
Need to bring altitude sensor to this side
/*This arduino controls orientation...it is always on standby and is only activated by the master arduino
immedietly the rocket fires.the function of this is to make sure the
rocket is always on the right way up for takeoff.
THIS SYSTEM IS ON THE I2C BUS HENCE IS A SLAVE
* *Has a unique adress to identify it from all other devices on the bus
however this system is not a must since its function is too regulate it to
vertical flight...this is only for best precision...
more attention is to be given to the landing system.......
//electric cycle engine for test in conjuction with gas generator.....pump to force kerosene through heat exchange......releies on good batteries...simplifies plumbing....
/*#define takeoff;//define a function to be called at takeoff
#define landing;//define a function to be called at landing*/
#include <NMEAGPS.h>//include neo gps library to guide rocket during landing
#include <Servo.h>
Servo extractionvalve, refillingvalve, mainoxygenvalve, mainkerosenevalve, chamberoxygenvalve, chamberkerosenevalve, Xaxis, Yaxis, gas; //declare servo types
const int startermotorrelay2 = 14; //set startermotorrelay2 to pin 13(power starter motor with internal-on board battery power)
const int sparkplug2 = 15;//lights up combustion engine
const int parachuterelay = 16;//lights up explosive bolts to eject parachute
const int leglock = 16;
@brian-kiplagat
brian-kiplagat / ASRO_driver_codes.ino
Created July 11, 2019 08:44
These are the driver codes that will run the uhuru-A engines
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#define BME_SCK 13
#define BME_MISO 12
#define BME_MOSI 11
#define BME_CS 10