module:micropython:esp32checkmath
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
module:micropython:esp32checkmath [2021/12/08 11:21] – omdevelop | module:micropython:esp32checkmath [2022/09/13 11:58] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
[[http:// | [[http:// | ||
[ | [ | ||
Line 8: | Line 8: | ||
] | ] | ||
- | Esp32CheckMath | Esp32CheckMath]] | + | ===== Benutzung ===== |
- | * [[:Module:MicroPython:Esp32CheckLedSystem | Esp32CheckLedSystem]] | + | Beispiel für die Einbindung der MicroPython-Library **Math.py** : |
- | * [[:Module: | + | <code python> |
+ | # | ||
+ | def Add(a, b): | ||
+ | return a + b | ||
+ | # | ||
+ | def Sub(a, b): | ||
+ | return a - b | ||
+ | # | ||
+ | </ | ||
+ | Wichtig: Die Library muss im FileSystem des MicroControllers vorhanden sein! | ||
+ | |||
+ | Aufrufendes Programm **Esp32CheckMath.py** : | ||
+ | <code python> | ||
+ | # | ||
+ | import Math as MAT | ||
+ | # | ||
+ | print(' | ||
+ | print(' | ||
+ | </ | ||
+ | |||
+ | Run-Ausgabe im Terminal: | ||
+ | < | ||
+ | >>> | ||
+ | >>> | ||
+ | 3 + 5 = 8 | ||
+ | 3 - 5 = -2 | ||
+ | ♦♦> | ||
+ | MicroPython | ||
+ | Type " | ||
+ | >>> | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Version ===== | ||
+ | |||
+ | {{:module: | ||
+ | {{: | ||
+ | |||
+ | ===== ===== | ||
----- | ----- |
module/micropython/esp32checkmath.1638958864.txt.gz · Last modified: 2021/12/08 12:21 (external edit)