SlideShare a Scribd company logo
Getting Started with
MicroPython
on the
Raspberry Pi Pico
Toronto Raspberry Pi Meetup Group
2021-02-11
Stewart Russell – scruss@scruss.com
What, another one?
 Not a Linux machine:
a microcontroller
 Custom silicon, designed by
Raspberry Pi Foundation
 Lots of I/O
 Great documentation
 $5.25 🇨🇦, any qty.
 Arduino killer
Image credit: Raspberry Pi Foundation
RP2040 Overview
 Dual-core ARM Cortex-M0+ at 133 MHz
 264 KB RAM
 No Flash storage
(Pico has 2 MB external)
 26 × multi-function GPIO pins
 2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit
ADC, 16 × PWM
 8 × PIO state machines
Image credit: Raspberry Pi Foundation
So where do I get one?
 In theory, you can buy as
many as you want, but:
 BuyaPi: Sold Out
 Canakit: Sold Out
(preorders ship Feb 28)
 Elmwood: Sold Out
 Newark, Digikey: on order
 My Canada Post experience
 BuyaPi: ordered Jan 21, arrived Feb 2.
Average speed: house spider
 Elmwood: ordered Jan 27, arrived Feb
3.
Average speed: 3-toed sloth
 Don’t use Canada Post because 😷
What is MicroPython?
 Python 3 implementation
 Small: 256 KB flash, 16 KB RAM (minimum)
 Compiled on-chip; standalone
 Subset of standard Python library
 Core developers were hired to implement for Pico
 Now includes ARMv6M assembler
 micropython.org
MicroPython Differences
 System libraries are typically limited, e.g.:
 Strings are always UTF-8; 8-bit codecs excluded
 Time is monotonic (fractional) seconds: no timezones or DST
 No CSV, numpy, pip (→ upip), …
 .py → .mpy (like .pyc) compilation isn’t automatic
 Hardware interface modules:
 machine: for hardware features like pins, PWM, I²C, ADC, …
 rp2: RP2040 PIO assembler, raw Flash access
 help() docstrings short or absent: see online docs
Flashing MicroPython
 Pico firmware is distributed as UF2
images
 Hold BOOTSEL while plugging in
 Pico appears as a USB storage
device
 Drag/copy UF2 to PICO storage
 Pico reboots; USB disappears
Image credit: Raspberry Pi Foundation
Editing: Thonny
 Raspberry Pi Foundation’s
recommended editor
 Installed by default
 Includes loading/saving to
Pico flash
 Has a simple graph tool
 … plus firmware updater
 … and (Raspberry) REPL
sorry not sorry
(and no, I don’t know why the graph broke)
“but my $EDITOR …!!1!”
 You don’t have to use Thonny
 … it’s just more work if you don’t.
 The command-line MicroPython tool with REPL access is rshell:
https://github.com/dhylands/rshell/tree/pico
 Make sure you get the this branch, as it handles the quirks of the
Pico’s RTC
 … and yes, the Foundation has shipped yet another device which
doesn’t have battery backup on its clock ☹
All of the Pins
raspberrypi.org/documentation/pico/getting-started
Documentation
 This is absolutely stellar for a board at launch + 3 weeks
 Data sheets, API guides, code, Fritzing parts … all at
raspberrypi.org/documentation/pico/getting-started
Unexpected Quirks
 It’s a new board, and folks are just learning, but:
1 ADC: default analogue-to-digital setup is quite noisy
2 PWM: duty cycle changes if frequency is changed
3 UART Serial: has no wait/timeout, will lock if read and no data
waiting
4 Dual core/threading: seems to be not well understood yet
Worked example
 Trevor Woerner used an MCP3008 with a thermistor and
Raspberry Pi last month:
 Let’s use a Pico
 … which is cheaper than
an MCP3008 (by 50¢ !)
 … and can act as a serial
datalogger, perhaps
writing to a Raspberry Pi over USB serial.
Image credit: Trevor Woerner
twoerner.blogspot.com/2021/01/sensing-temperature-with-raspberrypi.html
Wiring
 Pins used:
 ADC2 (pin 34)
 3V3 (pin 36)
 AGND (pin 33)
 10 kΩ resistor between 3V3
and thermistor
 10 kΩ @ 25 °C thermistor, β
= 3950
RaspberryPiPico.pptx

More Related Content

What's hot

ARM Architecture
ARM ArchitectureARM Architecture
ARM Architecture
Dwight Sabio
 
PIC Microcontrollers
PIC MicrocontrollersPIC Microcontrollers
PIC Microcontrollers
Abdullah Saghir Ahmad
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic Arduino
Vishnu
 
Introduction to raspberry pi
Introduction to raspberry piIntroduction to raspberry pi
Introduction to raspberry pi
praveen_23
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training ppt
Nishant Kayal
 
Introduction to Raspberrypi
Introduction to  RaspberrypiIntroduction to  Raspberrypi
Introduction to Raspberrypi
Iheb Ben Salem
 
Arduino
ArduinoArduino
Arduino
Jerin John
 
Raspberry pi ppt
Raspberry pi pptRaspberry pi ppt
Raspberry pi ppt
PavanKumar3601
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
Aniket Thakur
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduino
avikdhupar
 
PPT ON Arduino
PPT ON Arduino PPT ON Arduino
PPT ON Arduino
Ravi Phadtare
 
Interrupts programming in embedded C using 8051
Interrupts programming in embedded C using 8051Interrupts programming in embedded C using 8051
Interrupts programming in embedded C using 8051
Vikas Dongre
 
arduino
 arduino arduino
arduino
jhcid
 
Arduino Interfacing with different sensors and motor
Arduino Interfacing with different sensors and motorArduino Interfacing with different sensors and motor
Arduino Interfacing with different sensors and motor
Amarjeetsingh Thakur
 
Architecture of 8085 microprocessor
Architecture of 8085 microprocessorArchitecture of 8085 microprocessor
Architecture of 8085 microprocessor
AMAN SRIVASTAVA
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduinoAhmed Sakr
 
VHDL CODES
VHDL CODES VHDL CODES
VHDL CODES
OmkarDarekar6
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architecture
DominicHendry
 
arduino-ppt
 arduino-ppt arduino-ppt
arduino-ppt
jhcid
 

What's hot (20)

ARM Architecture
ARM ArchitectureARM Architecture
ARM Architecture
 
PIC Microcontrollers
PIC MicrocontrollersPIC Microcontrollers
PIC Microcontrollers
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic Arduino
 
Introduction to raspberry pi
Introduction to raspberry piIntroduction to raspberry pi
Introduction to raspberry pi
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training ppt
 
Introduction to Raspberrypi
Introduction to  RaspberrypiIntroduction to  Raspberrypi
Introduction to Raspberrypi
 
Arduino
ArduinoArduino
Arduino
 
Raspberry-Pi
Raspberry-PiRaspberry-Pi
Raspberry-Pi
 
Raspberry pi ppt
Raspberry pi pptRaspberry pi ppt
Raspberry pi ppt
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduino
 
PPT ON Arduino
PPT ON Arduino PPT ON Arduino
PPT ON Arduino
 
Interrupts programming in embedded C using 8051
Interrupts programming in embedded C using 8051Interrupts programming in embedded C using 8051
Interrupts programming in embedded C using 8051
 
arduino
 arduino arduino
arduino
 
Arduino Interfacing with different sensors and motor
Arduino Interfacing with different sensors and motorArduino Interfacing with different sensors and motor
Arduino Interfacing with different sensors and motor
 
Architecture of 8085 microprocessor
Architecture of 8085 microprocessorArchitecture of 8085 microprocessor
Architecture of 8085 microprocessor
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
 
VHDL CODES
VHDL CODES VHDL CODES
VHDL CODES
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architecture
 
arduino-ppt
 arduino-ppt arduino-ppt
arduino-ppt
 

Similar to RaspberryPiPico.pptx

Raspberry Pi Hacks
Raspberry Pi HacksRaspberry Pi Hacks
Raspberry Pi Hacks
Imad Rhali
 
Introduction to the rapid prototyping with python and linux for embedded systems
Introduction to the rapid prototyping with python and linux for embedded systemsIntroduction to the rapid prototyping with python and linux for embedded systems
Introduction to the rapid prototyping with python and linux for embedded systems
Naohiko Shimizu
 
Presentation raspberry pi
Presentation   raspberry piPresentation   raspberry pi
Presentation raspberry pi
Marco Casini
 
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.
 
IOT Experiment-2.pptx --- Hands on Approach & Easy to learn IOT Basics...
IOT Experiment-2.pptx --- Hands on Approach & Easy to learn IOT Basics...IOT Experiment-2.pptx --- Hands on Approach & Easy to learn IOT Basics...
IOT Experiment-2.pptx --- Hands on Approach & Easy to learn IOT Basics...
Ravindranath67
 
Raspberry Pi
Raspberry PiRaspberry Pi
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdfAdvanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
WiseNaeem
 
Getting started pi with android
Getting started pi with androidGetting started pi with android
Getting started pi with android
Masafumi Ohta
 
Raspberry Pi
 Raspberry Pi  Raspberry Pi
Raspberry Pi
Aditya Khandate
 
My presentation raspberry pi
My presentation raspberry piMy presentation raspberry pi
My presentation raspberry pi
HusainBhaldar21
 
Single Board Computers & Raspberry Pi Basics
Single Board Computers & Raspberry Pi BasicsSingle Board Computers & Raspberry Pi Basics
Single Board Computers & Raspberry Pi Basics
Eueung Mulyana
 
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdfAdvanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
WiseNaeem
 
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdfAdvanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
WiseNaeem
 
Raspberry pi on java 20121110
Raspberry pi on java 20121110Raspberry pi on java 20121110
Raspberry pi on java 20121110
Masafumi Ohta
 
Raspberry-PI introduction
Raspberry-PI introductionRaspberry-PI introduction
Raspberry-PI introduction
Basavaraj Sagar
 
Raspberry Pi and Amateur Radio - 2020 update
Raspberry Pi and Amateur Radio - 2020 updateRaspberry Pi and Amateur Radio - 2020 update
Raspberry Pi and Amateur Radio - 2020 update
Kevin Hooke
 
Getting Started with Raspberry Pi
Getting Started with Raspberry PiGetting Started with Raspberry Pi
Getting Started with Raspberry Pi
yeokm1
 
Raspberry Pi Free Session - 20_09_2014
Raspberry Pi Free Session - 20_09_2014Raspberry Pi Free Session - 20_09_2014
Raspberry Pi Free Session - 20_09_2014
Mandeesh Singh
 
Bringing Tizen to a Raspberry Pi 2 Near You
Bringing Tizen to a Raspberry Pi 2 Near YouBringing Tizen to a Raspberry Pi 2 Near You
Bringing Tizen to a Raspberry Pi 2 Near You
Samsung Open Source Group
 

Similar to RaspberryPiPico.pptx (20)

Raspberry Pi Hacks
Raspberry Pi HacksRaspberry Pi Hacks
Raspberry Pi Hacks
 
Introduction to the rapid prototyping with python and linux for embedded systems
Introduction to the rapid prototyping with python and linux for embedded systemsIntroduction to the rapid prototyping with python and linux for embedded systems
Introduction to the rapid prototyping with python and linux for embedded systems
 
Presentation raspberry pi
Presentation   raspberry piPresentation   raspberry pi
Presentation raspberry pi
 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PI
 
IOT Experiment-2.pptx --- Hands on Approach & Easy to learn IOT Basics...
IOT Experiment-2.pptx --- Hands on Approach & Easy to learn IOT Basics...IOT Experiment-2.pptx --- Hands on Approach & Easy to learn IOT Basics...
IOT Experiment-2.pptx --- Hands on Approach & Easy to learn IOT Basics...
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdfAdvanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
 
Getting started pi with android
Getting started pi with androidGetting started pi with android
Getting started pi with android
 
Raspberry Pi
 Raspberry Pi  Raspberry Pi
Raspberry Pi
 
report
reportreport
report
 
My presentation raspberry pi
My presentation raspberry piMy presentation raspberry pi
My presentation raspberry pi
 
Single Board Computers & Raspberry Pi Basics
Single Board Computers & Raspberry Pi BasicsSingle Board Computers & Raspberry Pi Basics
Single Board Computers & Raspberry Pi Basics
 
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdfAdvanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
 
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdfAdvanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
 
Raspberry pi on java 20121110
Raspberry pi on java 20121110Raspberry pi on java 20121110
Raspberry pi on java 20121110
 
Raspberry-PI introduction
Raspberry-PI introductionRaspberry-PI introduction
Raspberry-PI introduction
 
Raspberry Pi and Amateur Radio - 2020 update
Raspberry Pi and Amateur Radio - 2020 updateRaspberry Pi and Amateur Radio - 2020 update
Raspberry Pi and Amateur Radio - 2020 update
 
Getting Started with Raspberry Pi
Getting Started with Raspberry PiGetting Started with Raspberry Pi
Getting Started with Raspberry Pi
 
Raspberry Pi Free Session - 20_09_2014
Raspberry Pi Free Session - 20_09_2014Raspberry Pi Free Session - 20_09_2014
Raspberry Pi Free Session - 20_09_2014
 
Bringing Tizen to a Raspberry Pi 2 Near You
Bringing Tizen to a Raspberry Pi 2 Near YouBringing Tizen to a Raspberry Pi 2 Near You
Bringing Tizen to a Raspberry Pi 2 Near You
 

Recently uploaded

Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.pptPROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
bhadouriyakaku
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
zwunae
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
TOP 10 B TECH COLLEGES IN JAIPUR 2024.pptx
TOP 10 B TECH COLLEGES IN JAIPUR 2024.pptxTOP 10 B TECH COLLEGES IN JAIPUR 2024.pptx
TOP 10 B TECH COLLEGES IN JAIPUR 2024.pptx
nikitacareer3
 

Recently uploaded (20)

Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.pptPROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
TOP 10 B TECH COLLEGES IN JAIPUR 2024.pptx
TOP 10 B TECH COLLEGES IN JAIPUR 2024.pptxTOP 10 B TECH COLLEGES IN JAIPUR 2024.pptx
TOP 10 B TECH COLLEGES IN JAIPUR 2024.pptx
 

RaspberryPiPico.pptx

  • 1. Getting Started with MicroPython on the Raspberry Pi Pico Toronto Raspberry Pi Meetup Group 2021-02-11 Stewart Russell – scruss@scruss.com
  • 2. What, another one?  Not a Linux machine: a microcontroller  Custom silicon, designed by Raspberry Pi Foundation  Lots of I/O  Great documentation  $5.25 🇨🇦, any qty.  Arduino killer Image credit: Raspberry Pi Foundation
  • 3. RP2040 Overview  Dual-core ARM Cortex-M0+ at 133 MHz  264 KB RAM  No Flash storage (Pico has 2 MB external)  26 × multi-function GPIO pins  2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 16 × PWM  8 × PIO state machines Image credit: Raspberry Pi Foundation
  • 4. So where do I get one?  In theory, you can buy as many as you want, but:  BuyaPi: Sold Out  Canakit: Sold Out (preorders ship Feb 28)  Elmwood: Sold Out  Newark, Digikey: on order  My Canada Post experience  BuyaPi: ordered Jan 21, arrived Feb 2. Average speed: house spider  Elmwood: ordered Jan 27, arrived Feb 3. Average speed: 3-toed sloth  Don’t use Canada Post because 😷
  • 5. What is MicroPython?  Python 3 implementation  Small: 256 KB flash, 16 KB RAM (minimum)  Compiled on-chip; standalone  Subset of standard Python library  Core developers were hired to implement for Pico  Now includes ARMv6M assembler  micropython.org
  • 6. MicroPython Differences  System libraries are typically limited, e.g.:  Strings are always UTF-8; 8-bit codecs excluded  Time is monotonic (fractional) seconds: no timezones or DST  No CSV, numpy, pip (→ upip), …  .py → .mpy (like .pyc) compilation isn’t automatic  Hardware interface modules:  machine: for hardware features like pins, PWM, I²C, ADC, …  rp2: RP2040 PIO assembler, raw Flash access  help() docstrings short or absent: see online docs
  • 7. Flashing MicroPython  Pico firmware is distributed as UF2 images  Hold BOOTSEL while plugging in  Pico appears as a USB storage device  Drag/copy UF2 to PICO storage  Pico reboots; USB disappears Image credit: Raspberry Pi Foundation
  • 8. Editing: Thonny  Raspberry Pi Foundation’s recommended editor  Installed by default  Includes loading/saving to Pico flash  Has a simple graph tool  … plus firmware updater  … and (Raspberry) REPL sorry not sorry (and no, I don’t know why the graph broke)
  • 9. “but my $EDITOR …!!1!”  You don’t have to use Thonny  … it’s just more work if you don’t.  The command-line MicroPython tool with REPL access is rshell: https://github.com/dhylands/rshell/tree/pico  Make sure you get the this branch, as it handles the quirks of the Pico’s RTC  … and yes, the Foundation has shipped yet another device which doesn’t have battery backup on its clock ☹
  • 10. All of the Pins raspberrypi.org/documentation/pico/getting-started
  • 11. Documentation  This is absolutely stellar for a board at launch + 3 weeks  Data sheets, API guides, code, Fritzing parts … all at raspberrypi.org/documentation/pico/getting-started
  • 12. Unexpected Quirks  It’s a new board, and folks are just learning, but: 1 ADC: default analogue-to-digital setup is quite noisy 2 PWM: duty cycle changes if frequency is changed 3 UART Serial: has no wait/timeout, will lock if read and no data waiting 4 Dual core/threading: seems to be not well understood yet
  • 13. Worked example  Trevor Woerner used an MCP3008 with a thermistor and Raspberry Pi last month:  Let’s use a Pico  … which is cheaper than an MCP3008 (by 50¢ !)  … and can act as a serial datalogger, perhaps writing to a Raspberry Pi over USB serial. Image credit: Trevor Woerner twoerner.blogspot.com/2021/01/sensing-temperature-with-raspberrypi.html
  • 14. Wiring  Pins used:  ADC2 (pin 34)  3V3 (pin 36)  AGND (pin 33)  10 kΩ resistor between 3V3 and thermistor  10 kΩ @ 25 °C thermistor, β = 3950

Editor's Notes

  1. You can buy a whole reel of 480 for $2655 from Digikey: https://www.digikey.ca/en/products/detail/raspberry-pi/SC0915/13624793 Pins are not included. Board is castellated and can be surface-mounted to other electronics. Not really an Arduino killer: Arduino have announced the Arduino Micro Connect based on the RP2040 (price tba)
  2. Someone else will cover the deeper details soon It also has: * RTC * Low power sleep modes * Hardware RNG (though not crypto) Can be massively overclocked. The above photo was an early piece of test silicon: it’s not available in CERDIP format (boo!)
  3. Pico doesn’t export any USB storage, and some people don’t like the BOOTSEL process. You can use SWD to upload, and another Pico makes a good SWD probe