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:22] – omdevelop | module:micropython:esp32checkmath [2022/09/13 11:58] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| [[http:// | [[http:// | ||
| ] | ] | ||
| + | |||
| + | ===== Benutzung ===== | ||
| + | Beispiel für die Einbindung der MicroPython-Library **Math.py** : | ||
| + | <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 v1.17 on 2021-09-02; ESP32 module with ESP32 | ||
| + | Type " | ||
| + | >>> | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Version ===== | ||
| + | |||
| + | {{: | ||
| + | {{: | ||
| + | |||
| + | ===== ===== | ||
module/micropython/esp32checkmath.1638958955.txt.gz · Last modified: 2021/12/08 12:22 (external edit)