SlideShare a Scribd company logo
Python and electronics
My experience in Python 
● First project – parsing RigasSatiksme data 
● Various optimisations, school projects 
● Webmin-like interface 
● Some Linux utilities 
● Electronics
Why Python? 
● Ease to use – get started in a matter of minutes 
● Ease to experiment - console&forgiveness 
● Just code, don't care about low-level 
● When you need low-level, it's there for you 
● Great for prototyping 
● … It's dynamic – you learn how to debug
My experience in electronics 
● Simple circuits 
● PC repairs 
● Microcontroller-enabled circuits 
● User-friendly electronics
What electronics are about? 
● Getting data from sensors 
● Processing data 
● Sending data to actuators
Why electronics 
Because it's cool!
What one could use electronics for? 
● Assistance in everyday tasks 
● Work optimization 
● Entertainment 
● 
● 
● 
● Space exploration
Blending it together
20% Python, 80% electronics 
● LLL (low-level language) on MCU 
● Python on PC 
● PC and MCU communicate using serial or 
parallel ports 
● Most of the behaviour is controlled by LLL, PC 
sends commands to execute functions but has 
no access to MCU hardware 
● High entry level needed for MCU code
Low-level code on MCU + Python on PC 
Summary: 
● More capabilities, but harder to reach them 
● Fast 
Suitable projects: 
● Speed-related tasks 
● Projects requiring to work without PC
50% Python, 50% electronics 
● Python + Arduino, using Firmata firmware for 
Arduino side and pyFirmata library on PC side 
● All the behaviour is defined by script on PC side 
● LLL on MCU but you don't need to write any
Python + Firmata for Arduino
Python + Firmata for Arduino 
Summary: 
● Is fastest&cheapest base for simple projects 
● Might hit the limits when developing something more 
complicated 
Suitable projects: 
● Minimalistic projects 
● Cheap&fast projects, prototypes 
Find out more: http://slidesha.re/1zB1Rw4
80% Python, 80% electronics 
● Raspberry Pi – ARM MCU with Linux 
● Has tons of processing power 
● Runs Python, as well as a lot of other languages 
● Can easily interface with electronics 
● Has Linux layer between Python and electronics 
which annoys me sometimes 
● http://www.raspberrypi.org/
Raspberry Pi
Raspberry Pi
Some great advantages 
● All the advantages of Linux PC 
● USB, HDMI, RCA, Ethernet ports, audio output 
● A lot of RPi-dedicated hardware - “shields”, 
extending functionality 
● Huge user base
Raspberry Pi 
Summary 
● Universal and powerful 
● Is great for really advanced projects 
● Might be an expensive overkill for other 
Suitable projects: 
● All kinds of projects
What projects exactly? 
● Computers for education 
● Home media servers&HTPCs 
● Print/webcam/web/file/torrent/game servers 
● Robots&controllers&other awesome stuff 
● DIY smart house systems&security systems 
● Development-related projects 
● Wearable technology & car PCs 
● http://pingbin.com/2012/12/30-cool-ideas-raspberry-pi-project/
100% Python, 100% electronics 
● MicroPython project 
● Embeds Python interpreter on a MCU 
● Rewrite of CPython to be less memory-hungry 
● Not as powerful as Raspberry Pi, but more powerful 
than Arduino 
● Compatible with Arduino and some RPi shields 
● Awesome 
● https://www.kickstarter.com/projects/214379695/micro-python-
MicroPython advantages 
● Is already usable and still in active development 
● Has a growing community 
● Completely open-source 
● Assembler bindings for speed-related tasks 
● The interpreter runs on Unix
MicroPython disadvantages 
● Has a limited set of modules implemented 
● Has some memory limitations 
● https://github.com/micropython/micropython/wiki/Differences
What a beginner can do with 
MicroPython? 
● Start experimenting with electronics 
● Make your first simple project 
● Make your first useful project 
● Make your first usable project
MicroPython 
Summary 
● Is pure Python 
● Good for beginners in electonics 
Suitable projects: 
● From simple to complicated projects
OpenMV
Python-powered machine vision 
● Has MicroPython firmware, so all the 
advantages 
● Face/object detection 
● Object tracking 
● Thermal vision 
● http://hackaday.io/project/1313-openmv
Videos 
● http://youtu.be/To-KUylzmOM 
● http://youtu.be/T0ZxvSrkm58 
● http://youtu.be/9zFYHiPbdQI 
● http://youtu.be/AuMY1aiAN4k 
● http://youtu.be/s8KxrKeUsDU 
● http://youtu.be/AuMY1aiAN4k 
● http://youtu.be/Fk3Op-CsmFA
Docs 
● http://docs.micropython.org/en/latest/index.html

More Related Content

PDF
Using Erlang on the RaspberryPi to interact with the physical world
PDF
Damien George - Micro Python - CIUUK14
PPTX
Got Python I/O: IoT Develoment in Python via GPIO
PPT
Lego's First Programmable Product
ODP
Oshug 110929
PDF
Nfc base door
PPTX
Programming Closer to the Iron
PDF
Oleksii Pedorenko and Dmytro Melnychuk "DAO Project Experience"
Using Erlang on the RaspberryPi to interact with the physical world
Damien George - Micro Python - CIUUK14
Got Python I/O: IoT Develoment in Python via GPIO
Lego's First Programmable Product
Oshug 110929
Nfc base door
Programming Closer to the Iron
Oleksii Pedorenko and Dmytro Melnychuk "DAO Project Experience"

Similar to MicroPython&electronics prezentācija (20)

PDF
Python in the real world : from everyday applications to advanced robotics
PPTX
IoT for data science Module 5 - Raspberry Pi.pptx
PDF
Micropython for the iot
PDF
Getting Started with Embedded Python: MicroPython and CircuitPython
PPTX
Lecture 8
PDF
Tangible Tools For Teaching With Python
PPTX
Pi Is For Python
PPTX
Raspberry pi
PDF
My presentation raspberry pi
PDF
Raspberry pi: Conceptos básicos de la arquitectura de la computadora raspberr...
PDF
Iot Bootcamp - abridged - part 1
PDF
PyCon_India_2017_MicroPython_Ayan
PDF
Intro to the raspberry pi board
PPTX
Raspberry pi
PPTX
Raspberry Pi ppt.pptx
PPTX
Raspberry Pi ppt.pptx
PPTX
Pi, Python, and Paintball??? Innovating with Affordable Tech!
PDF
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
PPTX
Raspberry pi overview
PDF
Raspberry pi overview
Python in the real world : from everyday applications to advanced robotics
IoT for data science Module 5 - Raspberry Pi.pptx
Micropython for the iot
Getting Started with Embedded Python: MicroPython and CircuitPython
Lecture 8
Tangible Tools For Teaching With Python
Pi Is For Python
Raspberry pi
My presentation raspberry pi
Raspberry pi: Conceptos básicos de la arquitectura de la computadora raspberr...
Iot Bootcamp - abridged - part 1
PyCon_India_2017_MicroPython_Ayan
Intro to the raspberry pi board
Raspberry pi
Raspberry Pi ppt.pptx
Raspberry Pi ppt.pptx
Pi, Python, and Paintball??? Innovating with Affordable Tech!
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
Raspberry pi overview
Raspberry pi overview
Ad

Recently uploaded (20)

PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
DOCX
573137875-Attendance-Management-System-original
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PPTX
Artificial Intelligence
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPT
Project quality management in manufacturing
PPTX
Construction Project Organization Group 2.pptx
PPT
Mechanical Engineering MATERIALS Selection
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PPT
introduction to datamining and warehousing
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PPT
Total quality management ppt for engineering students
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PDF
PPT on Performance Review to get promotions
PPTX
Fundamentals of Mechanical Engineering.pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
573137875-Attendance-Management-System-original
UNIT-1 - COAL BASED THERMAL POWER PLANTS
III.4.1.2_The_Space_Environment.p pdffdf
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
Artificial Intelligence
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Project quality management in manufacturing
Construction Project Organization Group 2.pptx
Mechanical Engineering MATERIALS Selection
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
introduction to datamining and warehousing
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
Total quality management ppt for engineering students
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PPT on Performance Review to get promotions
Fundamentals of Mechanical Engineering.pptx
Ad

MicroPython&electronics prezentācija

  • 2. My experience in Python ● First project – parsing RigasSatiksme data ● Various optimisations, school projects ● Webmin-like interface ● Some Linux utilities ● Electronics
  • 3. Why Python? ● Ease to use – get started in a matter of minutes ● Ease to experiment - console&forgiveness ● Just code, don't care about low-level ● When you need low-level, it's there for you ● Great for prototyping ● … It's dynamic – you learn how to debug
  • 4. My experience in electronics ● Simple circuits ● PC repairs ● Microcontroller-enabled circuits ● User-friendly electronics
  • 5. What electronics are about? ● Getting data from sensors ● Processing data ● Sending data to actuators
  • 7. What one could use electronics for? ● Assistance in everyday tasks ● Work optimization ● Entertainment ● ● ● ● Space exploration
  • 9. 20% Python, 80% electronics ● LLL (low-level language) on MCU ● Python on PC ● PC and MCU communicate using serial or parallel ports ● Most of the behaviour is controlled by LLL, PC sends commands to execute functions but has no access to MCU hardware ● High entry level needed for MCU code
  • 10. Low-level code on MCU + Python on PC Summary: ● More capabilities, but harder to reach them ● Fast Suitable projects: ● Speed-related tasks ● Projects requiring to work without PC
  • 11. 50% Python, 50% electronics ● Python + Arduino, using Firmata firmware for Arduino side and pyFirmata library on PC side ● All the behaviour is defined by script on PC side ● LLL on MCU but you don't need to write any
  • 12. Python + Firmata for Arduino
  • 13. Python + Firmata for Arduino Summary: ● Is fastest&cheapest base for simple projects ● Might hit the limits when developing something more complicated Suitable projects: ● Minimalistic projects ● Cheap&fast projects, prototypes Find out more: http://slidesha.re/1zB1Rw4
  • 14. 80% Python, 80% electronics ● Raspberry Pi – ARM MCU with Linux ● Has tons of processing power ● Runs Python, as well as a lot of other languages ● Can easily interface with electronics ● Has Linux layer between Python and electronics which annoys me sometimes ● http://www.raspberrypi.org/
  • 17. Some great advantages ● All the advantages of Linux PC ● USB, HDMI, RCA, Ethernet ports, audio output ● A lot of RPi-dedicated hardware - “shields”, extending functionality ● Huge user base
  • 18. Raspberry Pi Summary ● Universal and powerful ● Is great for really advanced projects ● Might be an expensive overkill for other Suitable projects: ● All kinds of projects
  • 19. What projects exactly? ● Computers for education ● Home media servers&HTPCs ● Print/webcam/web/file/torrent/game servers ● Robots&controllers&other awesome stuff ● DIY smart house systems&security systems ● Development-related projects ● Wearable technology & car PCs ● http://pingbin.com/2012/12/30-cool-ideas-raspberry-pi-project/
  • 20. 100% Python, 100% electronics ● MicroPython project ● Embeds Python interpreter on a MCU ● Rewrite of CPython to be less memory-hungry ● Not as powerful as Raspberry Pi, but more powerful than Arduino ● Compatible with Arduino and some RPi shields ● Awesome ● https://www.kickstarter.com/projects/214379695/micro-python-
  • 21. MicroPython advantages ● Is already usable and still in active development ● Has a growing community ● Completely open-source ● Assembler bindings for speed-related tasks ● The interpreter runs on Unix
  • 22. MicroPython disadvantages ● Has a limited set of modules implemented ● Has some memory limitations ● https://github.com/micropython/micropython/wiki/Differences
  • 23. What a beginner can do with MicroPython? ● Start experimenting with electronics ● Make your first simple project ● Make your first useful project ● Make your first usable project
  • 24. MicroPython Summary ● Is pure Python ● Good for beginners in electonics Suitable projects: ● From simple to complicated projects
  • 26. Python-powered machine vision ● Has MicroPython firmware, so all the advantages ● Face/object detection ● Object tracking ● Thermal vision ● http://hackaday.io/project/1313-openmv
  • 27. Videos ● http://youtu.be/To-KUylzmOM ● http://youtu.be/T0ZxvSrkm58 ● http://youtu.be/9zFYHiPbdQI ● http://youtu.be/AuMY1aiAN4k ● http://youtu.be/s8KxrKeUsDU ● http://youtu.be/AuMY1aiAN4k ● http://youtu.be/Fk3Op-CsmFA