Skip to content

Commit f311cff

Browse files
fix
1 parent 7280811 commit f311cff

5 files changed

Lines changed: 33 additions & 7 deletions

File tree

tutorials/Lecture5.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,27 @@
99
## Multiple Inheritance
1010
Multiple Inheritance is used to inherit the properties of multiple classes. However, Python does not allow multiple inheritance from classes that have incompatible memory layouts at the C level, which is common with hardware classes in MicroPython.
1111

12+
```mermaid
13+
classDiagram
14+
class A {
15+
+methodA()
16+
}
17+
class B {
18+
+methodB()
19+
}
20+
class C {
21+
+methodC()
22+
}
23+
class D {
24+
+methodD()
25+
}
26+
27+
A <|-- C : Inheritance
28+
B <|-- C : Inheritance
29+
B <|-- D : Inheritance
30+
C <|-- D : Inheritance
31+
```
32+
1233
This code snippet is just to demonstrate the concept and syntax of multiple inheritance.
1334

1435
```python
@@ -121,6 +142,10 @@ classDiagram
121142

122143
### Setup differnet states of the controller using association
123144

145+
In the context of a microcontroller, state refers to the current values or conditions of the system’s internal variables, inputs, outputs, and memory at a specific moment in time. State is crucial for determining how the microcontroller should behave next.
146+
147+
For example, in a simple traffic light controller, one of the states could be `Traffic_Go` in which the green lights are `on()` while both the red and amber lights are `off()`.
148+
124149
```python
125150
from led_light import Led_Light
126151
from pedestrian_button import Pedestrian_Button

tutorials/Lecture6.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44

55
- Open & Closed Loop Control Systems
66
- Open Loop State Machine
7+
- Implement an Open Loop State Machine
78

89
## Open & Closed Loop Control Systems
910

1011
Open and closed loop control systems are two fundamental types of control systems used in engineering, automation, robotics, and other fields to manage the behavior of devices or processes.
1112

12-
### Open Loop
13+
### Open-Loop
1314

14-
An open loop control system is a type of system in which the control action is independent of the desired output or the actual system output.
15+
An open-loop control system is a type of system in which the control action is independent of the desired output or the actual system output.
1516

1617
How it works:
1718

@@ -24,9 +25,9 @@ Example:
2425

2526
A microwave oven: You set the cooking time, and the microwave runs for that duration regardless of how hot the food actually gets.
2627

27-
### Closed Loop
28+
### Closed-Loop
2829

29-
A closed loop control system (also called a feedback control system) is a system in which the control action is dependent on the desired output and the actual system output.
30+
A closed-loop control system (also called a feedback control system) is a system in which the control action is dependent on the desired output and the actual system output.
3031

3132
How it works:
3233

@@ -39,7 +40,7 @@ How it works:
3940

4041
Example:
4142

42-
A home thermostat: The home owner sets a desired temperature. The system measures the actual room temperature and adjusts the heater/cooler to reach and maintain the desired temperature. As the system gets closer (or overshoots) to the desired temperature it adjusts the output.
43+
A home thermostat works by allowing the homeowner to set a desired temperature. The system then measures the actual room temperature and adjusts the heater or cooler to reach and maintain the set temperature. As the system approaches—or overshootsthe desired temperature, it modifies its output accordingly.
4344

4445
## State Machine
4546

@@ -50,9 +51,9 @@ Key concepts:
5051
- States: Distinct modes or conditions in which the system can exist.
5152
- Transitions: Rules that define how and when the system moves from one state to another, often triggered by events or inputs.
5253
- Events/Inputs: External actions or signals that cause state transitions.
53-
- A State Machince can be open or closed
54+
- A State Machine can be open or closed
5455

55-
## Implement a Open Loop State Machine
56+
## Implement an Open Loop State Machine
5657

5758
## Usage: Controller Class (State Machine Example)
5859

3.47 MB
Binary file not shown.
3.52 MB
Binary file not shown.
3.47 MB
Binary file not shown.

0 commit comments

Comments
 (0)