Recent Posts
Raspberry Pi Pico W: Programming Digital Devices with MicroPython
Posted by
onMicroPython is a lean and efficient Python 3 programming language implementation that includes a small subset of the Python standard library and is optimized to run on microcontrollers and in constrained environments.
MicroPython is packed with advanced features, such as an interactive prompt, arbitrary precision integers, closures, list comprehensions, generators, exception handling, and more. Yet, it is compact enough to fit and run within just 256kB of code space and 16kB of RAM.
MicroPython aims to be as compatible with standard Python as possible, allowing you to quickly transfer code from the desktop to a microcontroller or embedded system.
MicroPython for the Raspberry Pi Pico W: A gentle introduction to programming digital circuits with Python
Welcome to MicroPython for the Raspberry Pi Pico W, a book introducing you to the exciting world of microcontrollers and small, Internet-enabled devices. Now revised and adapted to the popular Raspberry Pi Pico W microcontroller board—an inexpensive yet unbelievably powerful device.
For software, the language of choice is MicroPython, a lightweight version of Python designed to run on devices with limited resources.
This book teaches you how to create digital circuits that use Wi-Fi, sensors, screens, and buttons. It employs a "plug-and-play" approach that does not require soldering or programming in the familiar Python language. More Information...
Programming the Raspberry Pi Pico W in MicroPython
The Raspberry Pi Pico is a remarkable microcontroller. It has power and sophistication that would have been unthinkable a short time ago. It is ideal for the kind of jobs it does, with 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 implementing your algorithms effectively.
MicroPython is a great language for programming the Pico. It isn’t the fastest option, but in most cases, it is fast enough to interface with Pico’s hardware, and its main 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 you can create classes to encapsulate hardware, making it easier to use and understand.
The book aims to reveal what you can do with Pico's GPIO lines and widely used sensors, servo motors, and ADCs. After covering the GPIO, outputs and inputs, events, and interrupts, it gives you hands-on experience with 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 also introduced in this book. After discovering how the PIO works, we applied 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 using the Pico W's additional features, including how to create a web client and a web server, use HTTPS, and use asyncio. More Information...
CANPico v2 with Pico WH Pre-Installed
Controller Area Network (CAN bus) is a protocol used in hundreds of millions of devices, including cars, trucks, buses, construction machines, ships, tractors, and spacecraft. The Canis Labs CANPico is a carrier board in a ‘sock’ format for a Raspberry Pi Pico.
Solder on the Pico, and it is connected to an advanced CAN controller and transceiver, ready for connection to CAN bus wires via a simple screw terminal. In addition, the CANPico includes an instrument header with the analog CAN H and CAN L signals and the digital RX and TX signals for use with an oscilloscope or logic analyzer. Software support is via an open-source MicroPython SDK. More Information...