====== MicroPython: Esp32CheckMath ======
[[http://www.openhardsoftware.de/ | Open Hard- & Software]]
[
[[http://www.openhardsoftware.de/dokuwiki | DokuWiki]]
[[http://www.openhardsoftware.de/websites | WebSites]]
[[http://www.openhardsoftware.de/mediawiki | MediaWiki]]
[[http://www.openhardsoftware.de/nextcloud | NextCloud]]
]
===== Benutzung =====
Beispiel für die Einbindung der MicroPython-Library **Math.py** :
#
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** :
#
import Math as MAT
#
print('3 + 5 = {}'.format(MAT.Add(3, 5)))
print('3 - 5 = {}'.format(MAT.Sub(3, 5)))
Run-Ausgabe im Terminal:
>>> Running ..\Esp32CheckMath.py
>>>
3 + 5 = 8
3 - 5 = -2
♦♦>
MicroPython v1.17 on 2021-09-02; ESP32 module with ESP32
Type "help()" for more information.
>>>
===== Version =====
{{:module:micropython:2112081148_esp32checkmath_01v02.zip | 2112081148_Esp32CheckMath_01v02.zip}} \\
{{:module:micropython:2112062054_esp32checkmath_01v01.zip | 2112062054_Esp32CheckMath_01v01.zip}}
===== =====
-----
[[http://www.openhardsoftware.de/ | Open Hard- & Software]]
[
[[http://www.openhardsoftware.de/dokuwiki | DokuWiki]]
[[http://www.openhardsoftware.de/websites | WebSites]]
[[http://www.openhardsoftware.de/mediawiki | MediaWiki]]
[[http://www.openhardsoftware.de/nextcloud | NextCloud]]
]