Keywords: MicroPython Applications, Python in Embedded Systems, AI&ML in Embedded, Mutation Testing, Testing Automation, Pybricks, LEGO, Robotics
Hope for now we all know coding on Micro controllers using Python but why is Python actually needed when I have C/C++, Java etc in Embedded Systems.
Any guess , Yes you got it right.
- Python language is object oriented and interpreted not compiled.
- Clean and simple code to control hardware.
- Interactive REPL– Read Evaluate Print Loop.
- MicroPython has built-in libraries – serial,spi,can,socket and many more.
- Extensively can be mixed and used together with low-level C/C++ functions.
Python can be used in Real Time Embedded Applications.
- Device Control and Debugging
- Testing Automation
- Data Analysis
- Computer Vision
- Machine Learning & AI
- Audio Application
And many more. Here are some interesting few to list.
Case Study – Mutation Testing
Mutation testing using python turns invisible bugs into visible fixes.
Case Study – Testing Automation
Python might be at its strongest when used as a communication between the user and the embedded system working with. Sending messages through Python to or from an embedded system allows us to automate testing. Python scripts can put the system into different states, set configurations, and test all sorts of real-world use cases. Python can also be used to receive embedded system data that can be stored for data analysis.
Case Study – Computer Vision
- Face Detection
- Color Tracking
- Qr Code Detection etc
Case Study – Audio Application
- Sound Spectrum Analyser
- Speech Recognition
- Audio Recordings etc
Case Study – Robotics
Pybricks bring MicroPython to the realm of robotics and educational construction kits like LEGO and transforms remote-controlled smart hubs into truly autonomous robots.
There are boards available for just about every task: From the tiny, low cost ESP series of WiFi micro controller right up to the powerful, fully featured, Teensy. Here are a few to list.
- BBC Microbit
- ESP8266 WiFi
- Metro M0
- OpenMV CAM
- LEGO bricks
Till now we discussed about only PROS of MicroPython there are CONS as well.
Here are few drawbacks of MicroPython
- Speed – Python is slower than C or C++ as interpreted programs execute slower as compared to compiled programs.
- Memory Consumption – Due to the flexibility of the data-types, Python’s memory consumption is also high.
- RunTime Errors – Because the language is dynamically typed , it requires more testing and has errors that only show up at runtime.
THANK YOU and many more posts coming your way!