Data Flow and Putting it All Together
You need to think about your software logic before you start writing your flight code. A great way to plan how your software will run is by creating a flowchart. Start at with a high-level flowchart and then increase the detail. Consider some of the following questions:
- What do I need to do when my femtosat first turns on?
- How will I manage my data?
- How will I handle the different stages my femtosat will see while powered on: integration into rocket, waiting on pad, flight, deployment, landing?
- How do I want to process my data after launch? What do I need to do in my code to support that?
If you write all your code at once, it’ll be hard to figure out why it doesn’t work. Instead, write code for one part of your flow chart, then test it. If it works, write code for another part and test it. When you have working code for multiple parts, try putting them together and testing them together.
Programming the Femtosat
When you have flight code that works with your dev boards and your team has finished your femtosat, you’re ready to program your femtosat! Your femtosat is programmed the same way as the Arduino board from your computer. The only difference is that your femtosat has programming pins instead of USB. Instead you will plug your USB cable into an FTDI chip that will plug into your femtosat. You will be able to borrow the FTDI chips from us and then download the needed driver for it here:https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
The microcontrollers we provide are also loaded with a program that blinks the LED (if it uses the same pin as the example schematic) and prints information over the serial line. This is useful to make sure everything is wired up properly before you begin. Before you try to program you should verify this functionality first.
If your software doesn’t work on your femtosat, break the code into chunks again and try to get just one piece working at a time.
For more information on the FTDI module: