At the end of this project, you should be able to:
PWMServo fan; // create servo object to control the fan const int CENTRAL_FAN_PWM = ???; // Replace ??? with the Teensy PWM pin for the central fan void fan_setup() { fan.attach(CENTRAL_FAN_PWM); // attaches the fan to specified // Arduino pin to the object delay(100); fan.write(20); // write low throttle delay(3000); }
Make sure to call this new function from setup()
void set_hovercraft_forces(float fx, float fy, float torque)
This function accepts as input desired forces to be applied to hovercraft chassis, translates these desired forces into an appropriate thrust level for each of the lateral fans, and changes the thrust state of these fans. Note that the precise units of these forces are not really known. Don't worry, the units will "wash away" once we introduce our control gains in the next project.
You can set the duty cycle of the central fan using:
fan.write(duty)
where the duty parameter is a value between 0 and 255 (corresponding to zero to 100% duty cycle)
Note that each of these steps must be implemented as a separate state in your code.
In all cases, the chargers should show that they recognize "LiPo 3S" batteries when they are plugged in (the dual chargers will show "6S" when two batteries are plugged in).
It is possible to get the single charger into the wrong mode and the above sequence will fail or indicate a different battery type. If so, the included manual will give you the steps to return to "LiPo 3S" charging.
When the battery is being charged, it must be placed inside the Kevlar "burn bag" that has been provided to your group. The wires should be routed outside the bag to be plugged into the charger (do not put the charger in the bag).
For a successful project, we expect:
Last modified: Sat Mar 27 15:29:40 2021