Alligator HZV
  • HOME
  • MECHANICAL DESIGN
  • CIRCUIT DESIGN
    • HZV
    • LUC
  • PSEUDOCODE
    • HZV>
      • EventCheckers
      • CheckValidSM
      • InterpretSM
      • TransmitXbeeSM
      • MotorPIC
      • ServoPIC
      • BalloonMonitor_PIC
    • LUC
  • COMMUNICATION
  • SOFTWARE
    • HZV
    • LUC
  • BOM
  • GALLERY
  • GEMS OF WISDOM
  • TEAM PROFILE

MotorPIC
(On Motor Driving PIC)

Function: Main()
    Initialize Pins,PWM,and SPI communication
    Keep checking if all 3bytes have been received using DataReceived flag
    Figure out if we are zombie, if yes, call ZombieConvert() followed by HumanMode()
    else call HumanMode();
    call setPWM()
End

Function:Interrupt ISR()
    Checks if 3 bytes have been received, if not , keeps storing,
     else sets DataReceived flag high
End

Function: ZombieConvert()
    Set the speedData and DirnData to appropriate values depending on the message from necromancer
End

Function: HumanMode()
    Use DirnData, SpeedData and FlagData to determine Direction and brake pin values for the propeller driver boards.
End

Function: setPWM()
    Use the speedbyte to set PWM
    use the Dirnpins to set Direction and Brake values.
End


Powered by Create your own unique website with customizable templates.