GithubHelp home page GithubHelp logo

spark-ii-main's Introduction

spark-ii-main

An Arduino-framework-based Teensy 4.0 software for SPARK-II rocket electronics for receivin and data logging telemetry of sensor data.

Features

This software utilizes pseudo-asynchronous process to operate each type of operation in different phases and intervals. It also features Operational Mode, Simulation Mode (Coming soon), On-board SD Card Reading and DFU Mode (EEPROM Read/Write) via Serial command line.

System States

There are three integers specifying the state of software:

1. OS_STATE

os_state is for controlling software operation mode. Available states are:

  1. 0 Operational State
  2. 1 SD Directory listing
  3. 2 Wait for User Input -> Filename
  4. 3 Serial log Filename's File content for user/logger
  5. 4 Delete all files at root of inserted SD Card (DANGEROUS)
  6. 253 Simulation mode (Coming soon)
  7. 254 DFU Mode
  8. 255 End of operation

2. SS_STATE (Coming soon)

ss_state is for controlling overall stages and phases of suboperation. Available states are:

  1. 0 Prelaunch Phase
  2. 1 Ascending Phase
  3. 2 At-Apogee Phase
  4. 3 Deployment 1 Phase
  5. 4 Deployment 2 Phase
  6. 5 Final Descent Phase
  7. 6 Touchdown Phase (End of operation)

3. DFU_STATE

dfu_state is for controlling substates in DFU mode. Available states are:

  1. 0 DFU-off
  2. 1 DFU-on from off (DFU Wait for Input)
  3. 2 Serial log device_id
  4. 4 Read EEPROM memory at memory index
  5. 6 Write-update EEPROM memory at memory index with new value
  6. 8 Clear EEPROM memory to ZERO (0) (DANGEROUS)

User Commands (Can be automated)

Commands can be written via Serial command line.

  1. CHECK_STATE will print os_state, ss_state and dfu_state in each line.
  2. START_OP triggers update os_state to 0 in all conditions other than in SD Read Mode or DFU Mode (os_state is 2 or 254).
  3. READ_SD triggers update os_state to 1 in all conditions other than in SD Read Mode or DFU Mode (os_state is 2 or 254). After READ_SD, user can input Filename indefinitely until triggered by END_READ.
  4. ENTER_DFU triggers update os_state to 254 in all conditions other than in SD Read Mode or DFU Mode (os_state is 2 or 254).
  5. END_OP triggers update os_state to 255 in all conditions other than in SD Read Mode or DFU Mode (os_state is 2 or 254).
  6. END_READ triggers update os_state to 255 only when in SD Read Mode (os_state is 2).
  7. SYS_ADMIN_CMD_DELETION_ALL_SD (name to ensure no accidental deletion) deletes all files except directories in SD Card. This command must confirm again with CONFIRM_SYS_ADMIN_CMD_DELETION_ALL_SD.
  8. SYS_CMD_REQUEST_DEVICE_ID triggers update dfu_state to 2 only when enabled DFU Mode (os_state is 254 and dfu_state is not 0). The device will stay in DFU Mode (dfu_state returns to 1). Will respong with SYS_RESPOND_DEVICE_ID_[x...] when [x...] is an integer device_id.
  9. READ_EEPROM triggers update dfu_state to 4 only when enabled DFU Mode (os_state is 254 and dfu_state is not 0). After READ_EEPROM, user can input Memory index once. The device will stay in DFU Mode (dfu_state returns to 1).
  10. WRITE_EEPROM triggers update dfu_state to 6 only when enabled DFU Mode (os_state is 254 and dfu_state is not 0). After WRITE_EEPROM, user can input Memory Index and then Value to write. If Memory Index or Value is blank, dfu_state returns to 1. If Value is only written if and only if not already existed in Memory Index. This operation DOES NOT CHECK whether the EEPROM Memory Index or Value is available. The device will stay in DFU Mode (dfu_state returns to 1).
  11. SYS_ADMIN_CMD_CLEAR_EEPROM (name to ensure no accidental deletion) triggers update dfu_state to 4 only when enabled DFU Mode (os_state is 254 and dfu_state is not 0). The device will stay in DFU Mode (dfu_state returns to 1). This command must confirm again with CONFIRM_SYS_ADMIN_CMD_CLEAR_EEPROM.
  12. EXIT_DFU triggers update dfu_state to 0 and os_state to 0 only when enabled DFU Mode (os_state is 254 and dfu_state is not 0).

spark-ii-main's People

Contributors

vtneil avatar

Watchers

 avatar

spark-ii-main's Issues

Test: Note

Add a SD read settings (profile) functionality - Simulation, Fast Mode, Slow Mode, etc...

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.