HZV State Machine and Code Listing
The HZV software is built to respond to incoming packets, setting timers to ensure the communication protocol is not violated and checking for the status of the balloon monitor to shift the HZV into zombie mode. The HZV also handles the constraint on actuating the balloon popping mechanism, to ensure it is not deployed for longer than 2 seconds. The HZV Master and Slave communicate via SPI, with the Master sending a byte of 0xAA before sending the speed and direction bytes.
Code Listing
psuedocode
HZV:
protocol.h
protocol.c
main.c
HZV-slave:
protocol_slave.h
protocol_slave.c
pwm.h
pwm.c
main.c
Balloon Monitor:
BalloonMon.asm (pseudocode)