SlideShare a Scribd company logo
Getting Started with Embedded Python:
(MicroPython and CircuitPython)
By: Ayan Pahwa
About Me
Embedded Software
Engineer at Mentor
Graphics - A Siemens
Business
IoT Enthusiast
Security Researcher
FPV Drone Pilot
Mentor Graphics is world
leader in Electronics Design
Automation(Tools Business).
I work for Automotive
Embedded Software Division,
which deals in providing
custom solutions, OS and
BSP for IVI and ADAS
systems.
Contact: https://iayanpahwa.github.io
People who are really
serious about software
should make their own
hardware
- Alan Kay
Motivation
-
What is MicroPython
The MicroPython project is an open source
implementation of Python 3 that includes a small
subset of the Python standard libraries, and is
optimised to run on microcontrollers with constrained
environments like limited ROM, RAM and processing
power. It came about after a successful Kick-starter
campaign by Damien George.
Python 3
IoT
(Devices)
Microcontrollers
In a NutShell
Opportunities
~20MHz System Clock
~32Kb RAM
~16MB ROM
Single Core
Register Level Access
Microcontrollers
MicroPython
- A small stripped down version on Python3 which runs as firmware on microcontrollers,
exposes all the low level modules, acting as an operating system.
- It is packed full of advanced features such as an interactive prompt, arbitrary precision
integers, closures, list comprehension, generators, exception handling and more.
- Yet it is compact enough to fit and run within just 256k of code space and 16k of RAM.
- MicroPython aims to be as compatible with normal Python as possible to allow you to
transfer code with ease from the desktop to a microcontroller or embedded target.
- Python APIs for low level hardware modules- GPIOs, UART, PWM, ADC, i2c, SPI.
- Runs directly on bare-metal or in OS or web as emulator.
Python vs μPython vs CPython/PyPy vs Arduino
Refer: https://github.com/micropython/micropython/wiki
Boards Supported
The PyBoard
The ESP8266-NodeMCU
160Kb RAM
802.11 b/g/n
4MB Flash
GPIO, ADC, I2c, SPI
Functions & Libraries Supported
Interaction
Serial REPL (115200 BAUD RATE)
WEB REPL, works over LAN
File System mounts on host
Tools to transfer source code(ex: AMPY)
Emulation on linux host
Unicorn web based emulator(
Interaction: Serial
Loading uP on ESP8266 board
Install esptool - pip install esptool
Download uP firmware.bin from GitHub release pages for
your board.
Erase flash - esptool.py --port /path/to/ESP8266
erase_flash
Flash uP firmware - esptool.py --port /path/to/ESP8266 --
baud 460800 write_flash --flash_size=detect 0 firmware.bin
Connect Serial console - screen /dev/tty… 115200
Interaction: WebREPL
Setting up WebREPL
> import webrepl_setup
> Enter ‘E’ to enable it
> Enter and confirm password(defaults
micropythoN)
> Enter ‘y’ to reboot and save changes
Interaction: WebREPL
Interaction: Unicorn
https://micropython.org/unicorn
Interaction: Live
https://micropython.org/live
Interaction: Emulator
Interaction: h3llO WORlD
> from machine import Pin
> from time import sleep
> led = Pin(13, Pin.Out)
> led.on()
> sleep(1)
> led.off()
> sleep(1)
(DEMO)
HELLO WORLD OF ELECTRONICS
Interaction: Advance
File System on Flash to store:
WiFi credentials (SSID, PASSOWRD)
boot.py - POST operations
main.py - main executable
You can mount the fs over network, or
transfer files over webREPL or tools like
AMPY.
Interaction: Internals
CircuitPython
https://github.com/adafruit/circuitpython
Adafruit fork of MicroPython maintained for
educational purpose around boards sell by
Adafruit industries.
Centred Around ATMEL SAMD21 and ESP8266 SoCs.
Various new modules added like capacitive touch
APIs, Sound outputs, USB HID etc.
Bluetooth Low energy support with newly
supported NRF SoC port.
DISCLAIMER: Other than the stunts will be performed
by experts, No matter how many times you test before,
chances of live demo failures are incalculable
SHOW TIME
DEMOS

More Related Content

What's hot

Learn Evothings Studio along with ESP8266
Learn Evothings Studio along with ESP8266Learn Evothings Studio along with ESP8266
Learn Evothings Studio along with ESP8266
Hammad Tariq
 
TDD in deeply embedded system (Arduino) with TAP
TDD in deeply embedded system (Arduino) with TAPTDD in deeply embedded system (Arduino) with TAP
TDD in deeply embedded system (Arduino) with TAP
François Perrad
 
Introduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin ControlIntroduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin Control
Pradip Bhandari
 
The Parrot VM
The Parrot VMThe Parrot VM
The Parrot VM
François Perrad
 
Kuberenetes Robotics Distributed System
Kuberenetes Robotics Distributed SystemKuberenetes Robotics Distributed System
Kuberenetes Robotics Distributed System
Tomoya Fujita
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
Sulamita Garcia
 
aibo introduction at ROSCon2018@Madrid
aibo introduction at ROSCon2018@Madridaibo introduction at ROSCon2018@Madrid
aibo introduction at ROSCon2018@Madrid
Tomoya Fujita
 
[CON3189] JavaOne 2016 - Introduction to Java ME development for the Raspberr...
[CON3189] JavaOne 2016 - Introduction to Java ME development for the Raspberr...[CON3189] JavaOne 2016 - Introduction to Java ME development for the Raspberr...
[CON3189] JavaOne 2016 - Introduction to Java ME development for the Raspberr...
Kevin Hooke
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
Goa App
 
Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...
Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...
Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...
Raul Chong
 
Artificial Intelligence Neural Processing Unit Hikey970
Artificial Intelligence Neural Processing Unit Hikey970Artificial Intelligence Neural Processing Unit Hikey970
Artificial Intelligence Neural Processing Unit Hikey970
KnowledgeMavens
 
Getting Started with Raspberry Pi and Arduino
Getting Started with Raspberry Pi and ArduinoGetting Started with Raspberry Pi and Arduino
Getting Started with Raspberry Pi and Arduino
Chad Mairn
 
Building your own RC Car with Raspberry Pi
Building your own RC Car with Raspberry PiBuilding your own RC Car with Raspberry Pi
Building your own RC Car with Raspberry Pi
Jeff Prestes
 
Interacting with Intel Edison
Interacting with Intel EdisonInteracting with Intel Edison
Interacting with Intel Edison
FITC
 
FPGA MiSTer (July 2019)
FPGA MiSTer (July 2019)FPGA MiSTer (July 2019)
FPGA MiSTer (July 2019)
Brahim HAMADICHAREF
 
Interfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the WorldInterfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the World
Omer Kilic
 
Arduino1.0 RC
Arduino1.0 RCArduino1.0 RC
Arduino1.0 RC
馬 萬圳
 
Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?
Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?
Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?
Koan-Sin Tan
 
Scaling IoT: Telemetry, Command & Control, Analytics and the Cloud
Scaling IoT: Telemetry, Command & Control, Analytics and the CloudScaling IoT: Telemetry, Command & Control, Analytics and the Cloud
Scaling IoT: Telemetry, Command & Control, Analytics and the Cloud
Nick Landry
 
Raspberry pi pico projects raspberry pi projects
Raspberry pi pico projects raspberry pi projectsRaspberry pi pico projects raspberry pi projects
Raspberry pi pico projects raspberry pi projects
Ismailkhan77481
 

What's hot (20)

Learn Evothings Studio along with ESP8266
Learn Evothings Studio along with ESP8266Learn Evothings Studio along with ESP8266
Learn Evothings Studio along with ESP8266
 
TDD in deeply embedded system (Arduino) with TAP
TDD in deeply embedded system (Arduino) with TAPTDD in deeply embedded system (Arduino) with TAP
TDD in deeply embedded system (Arduino) with TAP
 
Introduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin ControlIntroduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin Control
 
The Parrot VM
The Parrot VMThe Parrot VM
The Parrot VM
 
Kuberenetes Robotics Distributed System
Kuberenetes Robotics Distributed SystemKuberenetes Robotics Distributed System
Kuberenetes Robotics Distributed System
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
 
aibo introduction at ROSCon2018@Madrid
aibo introduction at ROSCon2018@Madridaibo introduction at ROSCon2018@Madrid
aibo introduction at ROSCon2018@Madrid
 
[CON3189] JavaOne 2016 - Introduction to Java ME development for the Raspberr...
[CON3189] JavaOne 2016 - Introduction to Java ME development for the Raspberr...[CON3189] JavaOne 2016 - Introduction to Java ME development for the Raspberr...
[CON3189] JavaOne 2016 - Introduction to Java ME development for the Raspberr...
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...
Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...
Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...
 
Artificial Intelligence Neural Processing Unit Hikey970
Artificial Intelligence Neural Processing Unit Hikey970Artificial Intelligence Neural Processing Unit Hikey970
Artificial Intelligence Neural Processing Unit Hikey970
 
Getting Started with Raspberry Pi and Arduino
Getting Started with Raspberry Pi and ArduinoGetting Started with Raspberry Pi and Arduino
Getting Started with Raspberry Pi and Arduino
 
Building your own RC Car with Raspberry Pi
Building your own RC Car with Raspberry PiBuilding your own RC Car with Raspberry Pi
Building your own RC Car with Raspberry Pi
 
Interacting with Intel Edison
Interacting with Intel EdisonInteracting with Intel Edison
Interacting with Intel Edison
 
FPGA MiSTer (July 2019)
FPGA MiSTer (July 2019)FPGA MiSTer (July 2019)
FPGA MiSTer (July 2019)
 
Interfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the WorldInterfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the World
 
Arduino1.0 RC
Arduino1.0 RCArduino1.0 RC
Arduino1.0 RC
 
Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?
Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?
Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?
 
Scaling IoT: Telemetry, Command & Control, Analytics and the Cloud
Scaling IoT: Telemetry, Command & Control, Analytics and the CloudScaling IoT: Telemetry, Command & Control, Analytics and the Cloud
Scaling IoT: Telemetry, Command & Control, Analytics and the Cloud
 
Raspberry pi pico projects raspberry pi projects
Raspberry pi pico projects raspberry pi projectsRaspberry pi pico projects raspberry pi projects
Raspberry pi pico projects raspberry pi projects
 

Similar to PyCon_India_2017_MicroPython_Ayan

IoT: Internet of Things with Python
IoT: Internet of Things with PythonIoT: Internet of Things with Python
IoT: Internet of Things with Python
Lelio Campanile
 
Home Automation Using RPI
Home Automation Using  RPIHome Automation Using  RPI
Home Automation Using RPI
Ankara JUG
 
Raspberry pi course syllabus
Raspberry pi course syllabusRaspberry pi course syllabus
Raspberry pi course syllabus
Softroniics india
 
Raspberry pi Board Hardware & Software Setup
Raspberry pi Board Hardware & Software SetupRaspberry pi Board Hardware & Software Setup
Raspberry pi Board Hardware & Software Setup
RANAALIMAJEEDRAJPUT
 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PI
Cliff Samuels Jr.
 
Getting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry PiGetting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry Pi
Leon Anavi
 
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Mike Qin
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
Codemotion
 
Elasticwulf Pycon Talk
Elasticwulf Pycon TalkElasticwulf Pycon Talk
Elasticwulf Pycon Talk
Peter Skomoroch
 
Fedora 14 overview
Fedora 14 overviewFedora 14 overview
Fedora 14 overview
Bert Desmet
 
Advanced view of projects raspberry pi list raspberry pi projects
Advanced view of projects raspberry pi list raspberry pi projectsAdvanced view of projects raspberry pi list raspberry pi projects
Advanced view of projects raspberry pi list raspberry pi projects
WiseNaeem
 
WiFi mesh network(ESP32 mStar and mesh topology)
WiFi mesh network(ESP32 mStar and mesh topology)WiFi mesh network(ESP32 mStar and mesh topology)
WiFi mesh network(ESP32 mStar and mesh topology)
Raziuddin Khazi
 
Raspberry Pi - Unlocking New Ideas for Your Library
Raspberry Pi - Unlocking New Ideas for Your LibraryRaspberry Pi - Unlocking New Ideas for Your Library
Raspberry Pi - Unlocking New Ideas for Your Library
Brian Pichman
 
5 p9 pnor and open bmc overview - final
5 p9 pnor and open bmc overview - final5 p9 pnor and open bmc overview - final
5 p9 pnor and open bmc overview - final
Yutaka Kawai
 
Raspberry pi
Raspberry pi Raspberry pi
Raspberry pi
Rishabh Sharma
 
Rapid IoT Prototyping with Tizen on Raspberry Pi
Rapid IoT Prototyping with Tizen on Raspberry PiRapid IoT Prototyping with Tizen on Raspberry Pi
Rapid IoT Prototyping with Tizen on Raspberry Pi
Leon Anavi
 
Groß steuert klein - Wie lässt sich ein Arduino steuern?
Groß steuert klein - Wie lässt sich ein Arduino steuern?Groß steuert klein - Wie lässt sich ein Arduino steuern?
Groß steuert klein - Wie lässt sich ein Arduino steuern?
Lars Gregori
 
Raspberry Pi introduction
Raspberry Pi introductionRaspberry Pi introduction
Raspberry Pi introduction
Lotfi Messaoudi
 
Os Grossupdated
Os GrossupdatedOs Grossupdated
Os Grossupdated
oscon2007
 
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTInria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Stéphanie Roger
 

Similar to PyCon_India_2017_MicroPython_Ayan (20)

IoT: Internet of Things with Python
IoT: Internet of Things with PythonIoT: Internet of Things with Python
IoT: Internet of Things with Python
 
Home Automation Using RPI
Home Automation Using  RPIHome Automation Using  RPI
Home Automation Using RPI
 
Raspberry pi course syllabus
Raspberry pi course syllabusRaspberry pi course syllabus
Raspberry pi course syllabus
 
Raspberry pi Board Hardware & Software Setup
Raspberry pi Board Hardware & Software SetupRaspberry pi Board Hardware & Software Setup
Raspberry pi Board Hardware & Software Setup
 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PI
 
Getting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry PiGetting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry Pi
 
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
Elasticwulf Pycon Talk
Elasticwulf Pycon TalkElasticwulf Pycon Talk
Elasticwulf Pycon Talk
 
Fedora 14 overview
Fedora 14 overviewFedora 14 overview
Fedora 14 overview
 
Advanced view of projects raspberry pi list raspberry pi projects
Advanced view of projects raspberry pi list raspberry pi projectsAdvanced view of projects raspberry pi list raspberry pi projects
Advanced view of projects raspberry pi list raspberry pi projects
 
WiFi mesh network(ESP32 mStar and mesh topology)
WiFi mesh network(ESP32 mStar and mesh topology)WiFi mesh network(ESP32 mStar and mesh topology)
WiFi mesh network(ESP32 mStar and mesh topology)
 
Raspberry Pi - Unlocking New Ideas for Your Library
Raspberry Pi - Unlocking New Ideas for Your LibraryRaspberry Pi - Unlocking New Ideas for Your Library
Raspberry Pi - Unlocking New Ideas for Your Library
 
5 p9 pnor and open bmc overview - final
5 p9 pnor and open bmc overview - final5 p9 pnor and open bmc overview - final
5 p9 pnor and open bmc overview - final
 
Raspberry pi
Raspberry pi Raspberry pi
Raspberry pi
 
Rapid IoT Prototyping with Tizen on Raspberry Pi
Rapid IoT Prototyping with Tizen on Raspberry PiRapid IoT Prototyping with Tizen on Raspberry Pi
Rapid IoT Prototyping with Tizen on Raspberry Pi
 
Groß steuert klein - Wie lässt sich ein Arduino steuern?
Groß steuert klein - Wie lässt sich ein Arduino steuern?Groß steuert klein - Wie lässt sich ein Arduino steuern?
Groß steuert klein - Wie lässt sich ein Arduino steuern?
 
Raspberry Pi introduction
Raspberry Pi introductionRaspberry Pi introduction
Raspberry Pi introduction
 
Os Grossupdated
Os GrossupdatedOs Grossupdated
Os Grossupdated
 
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTInria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
 

More from Ayan Pahwa

Kicad 101
Kicad 101Kicad 101
Kicad 101
Ayan Pahwa
 
IoT with circuitpython | CloudBadge
IoT with circuitpython | CloudBadgeIoT with circuitpython | CloudBadge
IoT with circuitpython | CloudBadge
Ayan Pahwa
 
MQTT on Raspberry Pi - Basics
MQTT on Raspberry Pi - BasicsMQTT on Raspberry Pi - Basics
MQTT on Raspberry Pi - Basics
Ayan Pahwa
 
Basics of Embedded Systems / Hardware - Architectures
Basics of Embedded Systems / Hardware - ArchitecturesBasics of Embedded Systems / Hardware - Architectures
Basics of Embedded Systems / Hardware - Architectures
Ayan Pahwa
 
Using Linux in commercial products + Yocto Project touchdown
Using Linux in commercial products + Yocto Project touchdownUsing Linux in commercial products + Yocto Project touchdown
Using Linux in commercial products + Yocto Project touchdown
Ayan Pahwa
 
Reverse engineering IoT Devices
Reverse engineering IoT DevicesReverse engineering IoT Devices
Reverse engineering IoT Devices
Ayan Pahwa
 

More from Ayan Pahwa (6)

Kicad 101
Kicad 101Kicad 101
Kicad 101
 
IoT with circuitpython | CloudBadge
IoT with circuitpython | CloudBadgeIoT with circuitpython | CloudBadge
IoT with circuitpython | CloudBadge
 
MQTT on Raspberry Pi - Basics
MQTT on Raspberry Pi - BasicsMQTT on Raspberry Pi - Basics
MQTT on Raspberry Pi - Basics
 
Basics of Embedded Systems / Hardware - Architectures
Basics of Embedded Systems / Hardware - ArchitecturesBasics of Embedded Systems / Hardware - Architectures
Basics of Embedded Systems / Hardware - Architectures
 
Using Linux in commercial products + Yocto Project touchdown
Using Linux in commercial products + Yocto Project touchdownUsing Linux in commercial products + Yocto Project touchdown
Using Linux in commercial products + Yocto Project touchdown
 
Reverse engineering IoT Devices
Reverse engineering IoT DevicesReverse engineering IoT Devices
Reverse engineering IoT Devices
 

Recently uploaded

Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
jpupo2018
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 

Recently uploaded (20)

Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 

PyCon_India_2017_MicroPython_Ayan

  • 1. Getting Started with Embedded Python: (MicroPython and CircuitPython) By: Ayan Pahwa
  • 2. About Me Embedded Software Engineer at Mentor Graphics - A Siemens Business IoT Enthusiast Security Researcher FPV Drone Pilot Mentor Graphics is world leader in Electronics Design Automation(Tools Business). I work for Automotive Embedded Software Division, which deals in providing custom solutions, OS and BSP for IVI and ADAS systems. Contact: https://iayanpahwa.github.io
  • 3. People who are really serious about software should make their own hardware - Alan Kay Motivation -
  • 4. What is MicroPython The MicroPython project is an open source implementation of Python 3 that includes a small subset of the Python standard libraries, and is optimised to run on microcontrollers with constrained environments like limited ROM, RAM and processing power. It came about after a successful Kick-starter campaign by Damien George.
  • 7.
  • 8. ~20MHz System Clock ~32Kb RAM ~16MB ROM Single Core Register Level Access Microcontrollers
  • 9. MicroPython - A small stripped down version on Python3 which runs as firmware on microcontrollers, exposes all the low level modules, acting as an operating system. - It is packed full of advanced features such as an interactive prompt, arbitrary precision integers, closures, list comprehension, generators, exception handling and more. - Yet it is compact enough to fit and run within just 256k of code space and 16k of RAM. - MicroPython aims to be as compatible with normal Python as possible to allow you to transfer code with ease from the desktop to a microcontroller or embedded target. - Python APIs for low level hardware modules- GPIOs, UART, PWM, ADC, i2c, SPI. - Runs directly on bare-metal or in OS or web as emulator.
  • 10. Python vs μPython vs CPython/PyPy vs Arduino Refer: https://github.com/micropython/micropython/wiki
  • 13. The ESP8266-NodeMCU 160Kb RAM 802.11 b/g/n 4MB Flash GPIO, ADC, I2c, SPI
  • 15. Interaction Serial REPL (115200 BAUD RATE) WEB REPL, works over LAN File System mounts on host Tools to transfer source code(ex: AMPY) Emulation on linux host Unicorn web based emulator(
  • 16. Interaction: Serial Loading uP on ESP8266 board Install esptool - pip install esptool Download uP firmware.bin from GitHub release pages for your board. Erase flash - esptool.py --port /path/to/ESP8266 erase_flash Flash uP firmware - esptool.py --port /path/to/ESP8266 -- baud 460800 write_flash --flash_size=detect 0 firmware.bin Connect Serial console - screen /dev/tty… 115200
  • 17. Interaction: WebREPL Setting up WebREPL > import webrepl_setup > Enter ‘E’ to enable it > Enter and confirm password(defaults micropythoN) > Enter ‘y’ to reboot and save changes
  • 22. Interaction: h3llO WORlD > from machine import Pin > from time import sleep > led = Pin(13, Pin.Out) > led.on() > sleep(1) > led.off() > sleep(1)
  • 23. (DEMO) HELLO WORLD OF ELECTRONICS
  • 24. Interaction: Advance File System on Flash to store: WiFi credentials (SSID, PASSOWRD) boot.py - POST operations main.py - main executable You can mount the fs over network, or transfer files over webREPL or tools like AMPY.
  • 26. CircuitPython https://github.com/adafruit/circuitpython Adafruit fork of MicroPython maintained for educational purpose around boards sell by Adafruit industries. Centred Around ATMEL SAMD21 and ESP8266 SoCs. Various new modules added like capacitive touch APIs, Sound outputs, USB HID etc. Bluetooth Low energy support with newly supported NRF SoC port.
  • 27. DISCLAIMER: Other than the stunts will be performed by experts, No matter how many times you test before, chances of live demo failures are incalculable SHOW TIME
  • 28. DEMOS