User Tools

Site Tools


module:micropython:esp32checkmath

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
module:micropython:esp32checkmath [2021/12/08 11:21] omdevelopmodule:micropython:esp32checkmath [2022/09/13 11:58] (current) – external edit 127.0.0.1
Line 1: Line 1:
-======  ======+====== MicroPython: Esp32CheckMath ======
 [[http://www.openhardsoftware.de/ | Open Hard- & Software]] [[http://www.openhardsoftware.de/ | Open Hard- & Software]]
 [ [
Line 8: Line 8:
 ] ]
  
-Esp32CheckMath | Esp32CheckMath]] +===== Benutzung ===== 
-  [[:Module:MicroPython:Esp32CheckLedSystem | Esp32CheckLedSystem]] +Beispiel für die Einbindung der MicroPython-Library **Math.py** : 
-  [[:Module:MicroPython:Esp32CheckThreading Esp32CheckThreading]]+<code python> 
 +
 +def Add(a, b): 
 + return a + b 
 +
 +def Sub(a, b)
 + return a - b 
 +
 +</code> 
 +Wichtig: Die Library muss im FileSystem des MicroControllers vorhanden sein! 
 + 
 +Aufrufendes Programm **Esp32CheckMath.py** : 
 +<code python> 
 +
 +import Math as MAT 
 +
 +print('3 + 5 = {}'.format(MAT.Add(3, 5))) 
 +print('3 - 5 = {}'.format(MAT.Sub(3, 5)))  
 +</code> 
 + 
 +Run-Ausgabe im Terminal: 
 +<code> 
 +>>> 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. 
 +>>> 
 +</code> 
 + 
 + 
 +===== Version ===== 
 + 
 +{{:module:micropython:2112081148_esp32checkmath_01v02.zip 2112081148_Esp32CheckMath_01v02.zip}} \\ 
 +{{:module:micropython:2112062054_esp32checkmath_01v01.zip | 2112062054_Esp32CheckMath_01v01.zip}} 
 + 
 +===== ===== 
  
 ----- -----
module/micropython/esp32checkmath.1638958864.txt.gz · Last modified: 2021/12/08 12:21 (external edit)