Skip to content

an open source flight firmware with active Thrust Vector Control.

License

Notifications You must be signed in to change notification settings

hyphenspace/opentvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opentvc tests Netlify Status License: MIT

What is opentvc?

Open thrust vector control (opentvc) is a model rocket flight firmware that is built to runs on the hyphen flight computer.
The firmware features libaries that supports control for servos, USART, SPI and the on-board hardware. Data is sent from an AVR microcontroller via UART and received by Nordic nRF5832 BLE module.
This exchage is biodirectional so data can also be sent out from the BLE module to AVR microcontroller.

Installation

Running in Docker

  1. Build docker environment
docker build -t opentvc:0.5 .
  1. Run docker environment
docker run -it opentvc:0.5
  1. Change directory to where source file sits
cd board 
  1. Build firmware
make 

Servo library usage example

#include "drivers/servo.h"

int main(void) {
  servoInit(); // Configures 16 bit registers for 50Hz PWM signal.
  servoAttach(Y_SERVO); 
  servoAttach(Z_SERVO);
  while(1) {
    servoWriteY(0); // Write angle 0 to servo controlling Y axis
    servoWriteZ(0); // Write angle 0 to servo controlling Z axis
  }
  return 0;
}

Directory Structure

  • board -- Code that runs on the ATmega328/328P
  • doc -- Doxygen documentation folder

board
    ├── fxas21002 # Library used for retrieving gyroscope data
    ├── fxos8700cq # Library used for retrieving accelerometer and magnetometer data
    ├── servo # Library used for servo control
    ├── usart # Library used for USART communication
    ├── time # Library used timing events
    ├── spi # Library used for SPI communication
    ├── hardware # Library used to control on-board hardware 
    ├── firmware # Folder that holds compiled firmware