def tel_op(a, b):
return a + b
resultaat = tel_op(10, 20)
print(resultaat)
'''
MicroPython hoeft de types niet vooraf te kennen.
'''
'''
| Mogelijkheid | MicroPython | Arduino / C++ |
| ------------------------------- | -------------- | ------------------------------------ |
| Functie aan variabele toekennen | ✅ direct | ✅ function pointer / `auto` |
| Functie als argument | ✅ direct | ✅ function pointer, template, lambda |
| Functie teruggeven | ✅ direct | ✅ pointer/lambda/callable |
| Geneste gewone functie | ✅ | ❌ |
| Lambda | ✅ | ✅ |
| Closure | ✅ natuurlijk | ✅ capturing lambda |
| Functie is echt een object | ✅ | ❌ gewone functie niet |
| Syntax/eenvoud | zeer eenvoudig | meer type-informatie nodig |
'''
Loading
esp32-devkit-v1
esp32-devkit-v1