وبلاگ بلیان

Programming the Raspberry Pi Pico/W in MicroPython, Second Edition

معرفی کتاب «Programming the Raspberry Pi Pico/W in MicroPython, Second Edition» نوشتهٔ Harry Fairhead, Mike James، منتشرشده توسط نشر I/O Press در سال 2022. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Programming the Raspberry Pi Pico/W in MicroPython, Second Edition» در دستهٔ بدون دسته‌بندی قرار دارد.

Reviews of the first edition: "Obviously the author knows his stuff. I love the writing style and helpful hints to deal with python limitations." "Book contains many nuggets of info not found in other books." The Raspberry Pi Pico is a remarkable microcontroller. It has a power and sophistication that would have been unthinkable just a short time ago. For the sort of jobs it is ideal for, it has plenty of processing power and enough memory to make tasks that would have once required careful planning, relatively easy. Instead of struggling with the machine, you can now focus on a good implementation of your algorithms. MicroPython is a good choice of language to program the Pico. It isn’t the fastest way, but in most cases it is fast enough to interface with the Pico’s hardware and its big advantage is that it is easy to use. As a high-level language, MicroPython is based on Python 3 and is fully object-oriented. This means that you can create classes to encapsulate hardware and make it easier to use and understand. The purpose of the book is to reveal what you can do with the Pico's GPIO lines together with widely used sensors, servos and motors and ADCs. After covering the GPIO, outputs and inputs, events and interrupts, it gives you hands-on experience of PWM (Pulse Width Modulation), the SPI bus, the I2C bus and the 1-Wire bus. One of the key advantages of the Pico is its PIO (Programmable I/O) and while this is an advanced feature, it is introduced in this book. After finding out how the PIO works, we apply it to writing a PIO program for the DHT22 and the 1-Wire bus. The original Pico lacked WiFi connectivity, a limitation overcome by the launch of the Pico W. Two new chapters are dedicated to how to make use of the additional features of the Pico W including how to create a web client and a web server, use HTTPS and asyncio. Jointly authored by Harry Fairhead and Mike James , this book is along the same lines as Programming the Raspberry Pi Pico/W in C and combines Harry’s expertise in electronics and the IoT with Mike’s knowledge of Python. Harry Fairhead is also the author of Raspberry Pi IoT In C Using Linux Drivers , Raspberry Pi IoT in C , Applying C For The IoT With Linux , Fundamental C: Getting Closer To The Machine and Micro:bit IoT in C . Mike James is the author of the Programmer's Python: Something Completely Different series of books and several other programming and computer science titles in the I Programmer Library. Second Edition Preface Table of Contents Chapter 1 The Raspberry Pi Pico – Before We Begin The Pico And Its Family What To Expect What Do You Need? Community Summary Chapter 2 Getting Started Installing MicroPython Hello World Using Thonny Hello World VS Code Summary Chapter 3 Getting Started With The GPIO Pico Pins Basic GPIO Functions Blinky Which Hardware? Summary Chapter 4 Simple Output Basic GPIO Functions How Fast? Including Pauses Fixed Time Delay Phased Pulses Setting Multiple GPIO Lines Summary Chapter 5 Some Electronics Electrical Drive Characteristics Driving An LED LED BJT Drive A BJT Example MOSFET Driver MOSFET LED Setting Drive Type Push-Pull Mode Pull-Up Mode Pull-Down Mode Setting Output Mode Basic Input Circuit - The Switch Debounce The Potential Divider Summary Chapter 6 Simple Input GPIO Input Basic Input Functions The Simple Button Press Or Hold How Fast Can We Measure? The Finite State Machine FSM Button FSM Hold Button FSM Ring Counter Summary Chapter 7 Advanced Input – Events and Interrupts Events Interrupts Considered Harmful? Hardware Events An Edgy Button Measuring Pulses With Events Interrupts How Fast Is An Interrupt? Race Conditions and Starvation Responding To Input Summary Chapter 8 Pulse Width Modulation Some Basic Pico PWM Facts Pico PWM Changing The Duty Cycle Duty Cycle Resolution Uses Of PWM – Digital To Analog Frequency Modulation Controlling An LED What Else Can You Use PWM For? Summary Chapter 9 Controlling Motors And Servos DC Motor Brushed Motors Unidirectional Brushed Motor Unidirectional PWM Motor Controller Bidirectional Brushed Motor Bidirectional Motor Software Using A Single Full H-Bridge As Two Half H-Bridges Controlling a Servo Brushless DC Motors Stepper Motors Stepper Motor Driver Stepper Motor Rotation – Using Timers Summary Chapter 10 Getting Started With The SPI Bus SPI Bus Basics Pico SPI Interfaces The SPI Functions Initialization Data Transfer Functions Using the Data Transfer Functions A Loopback Example Using The CS Line The BME280 Humidity, Pressure and Temperature Sensor Problems Summary Chapter 11 A-To-D And The SPI Bus Pico ADC The MCP3008 SPI ADC Connecting To The Pico Basic Configuration The Protocol SPI ADC Class How Fast? Summary Chapter 12 Using The I2C Bus I2C Hardware Basics The Pico I2C The I2C Functions Initialization Write Writing To A Register Read Reading A Register Slow Read Protocols A Real Device A First Program The I2C Protocol In Action Reading The Raw Temperature Data Processing The Data Reading Humidity Checksum Calculation Complete Listing Summary Chapter 13 Using The PIO PIO Basic Concepts State Machines And GPIO PIO Blinky Clock Division And Timing Writing Loops Data To The PIO Output To GPIO Side Effects Input Edges Advanced PIO Summary Chapter 14 The DHT22 Sensor Implementing A Custom Protocol The DHT22 The Electronics The DHT Driver The Protocol Reading The Data Extracting The Data DHT22 Using the PIO – Counting DHT22 Using the PIO – Sampling Complete Listing Summary Chapter 15 The 1‐Wire Bus And The DS1820 The Hardware Initialization Using The Driver Writing Bits Writing With The Driver A First Command - Writing Bytes Writing Bytes With the Driver Reading Bits Reading Using The Driver Working With 1-Wire Devices Computing The CRC The DS18B20 Hardware The DS18B20 Driver Initialization Initiating Temperature Conversion Reading the Scratchpad Getting The Temperature A Temperature Class The Complete Program Driver Version A PIO DS18B20 Program Complete Program Other Commands Summary Chapter 16 The Serial Port Serial Protocol UART Hardware Setting Up the UART Data Transfer Serial Polling Timeouts Polling On Write Reading and Writing Characters and Strings Summary Chapter 17 Using The Pico W - WiFi The Pico W The WLAN Class A Practical Connect WiFi Scan A Simple HTTP Client Request Methods A Custom Server The urequests Module A Temperature Sensor Client Sockets Socket Address Client Sockets A Socket Web Client SSL Socket Based HTTPS Client Socket Server A Socket Temperature Server An SSL HTTPS Server Non-Blocking Sockets The Connection Queue Summary Chapter 18 Asyncio And Servers Coroutines and Tasks Await Awaiting Sleep Tasks Sequential and Concurrent Canceling Tasks Dealing With Exceptions Shared Variables and Locks Using uasyncio Async Networking Downloading A Web Page Server A Web Server Best Practice Summary Chapter 19 Direct To The Hardware Registers Single-Cycle IO Block Blinky Revisited Example I - Events Example II PAD - Pull, Drive and Schmitt Two Processors Watchdog and FlashNuke Digging Deeper Summary Programming The Raspberry Pi Pico/W In C, Second Edition ISBN: 978-1871962796 Master the Raspberry Pi Pico ISBN: 978-1871962819 Raspberry Pi IoT in C, Second Edition ISBN: 978-1871962635 Programmer's Python: Everything is an Object, Second EditionISBN: 978-1871962741 Programmer's Python: Everything is DataISBN: 978-1871962595 Programmer’s Python: Async ISBN: 978-1871962595 Raspberry Pi IoT in Python With GPIO Zero ISBN:9781871962666 Raspberry Pi IoT in C With Linux Drivers ISBN:9781871962642 Raspberry Pi IoT in Python With Linux Drivers ISBN:9781871962659 Applying C For The IoT With Linux ISBN: 978-1871962611 Fundamental C: Getting Closer To The Machine ISBN: 978-1871962604
دانلود کتاب Programming the Raspberry Pi Pico/W in MicroPython, Second Edition