AeroShield Class¶
- class automationshield.AeroShield(port: str | None = None)[source]¶
Bases:
BaseShieldClass for Aeroshield device. Inherits from BaseShield.
The Aeroshield is a pendulum control experiment. The actuator is a propeller at the end of the pendulum. The position of the pendulum is measured by an angle sensor.
- Interface:
Actuator input should be provided in percent by default.
Potentiometer is provided in percent by default.
Sensor values are converted to degrees by default.
- Parameters:
port (str | None) – Port on which the Arduino is connected, defaults to None.
- script: str = 'aeroshield'¶
Name of the script directory in which the
.inofile for the specific shield is located.
- shield_id: str = 'AE'¶
ID assigned to shield. This is used to check whether the correct firmware is installed on the Arduino.
- class PlotInfo[source]¶
Bases:
PlotInfo- sensor_min: float = 0¶
Sets to lower bound of the sensor value. This is used to set up the
LivePlotter.
- sensor_max: float = 180¶
Sets the upper bound of the sensor value. This is used to set up the
LivePlotter.
- convert_sensor_reading(raw: int) float[source]¶
Convert raw angle to degrees.
\[\alpha_{deg} = \alpha_{raw} \cdot \frac{360}{2^{n}}\]where \(n\) equals
AeroShield.sensor_bits.