Wellys Dev

  • Home
  • Search/Topics
  • Writings
  • About

    2024

  • 2024-02-29
    RP2040 MicroPython: Making a Web Server with WebSockets

    Where I expand on creating a web server application on a Pi Pico W by incorporating web sockets.

    Repository

    • MicroPython Webserver on Pico W

    Introduction

    In the first part of this entry, I introduced the ability to develop an HTTP-based web server using solely HTML to control the Pi Pico pins. I focused on HTTP protocol as you can write everything in the relatively simple language, HTML and it works. I used checkbox or radio button inputs to a form to control pins on the Pico. This is a far more simple approach than using JavaScript. It does introduce some significant delays as each form submission must make a complete round trip (i.e. a page reload).

  • 2023

  • 2023-09-23
    RP2040 MicroPython: Onboard Shell

    Where I demonstrate an enhanced on-board shell for RP2040 (Pi Pico and Pi Pico W) using MicroPython, upysh2.py.

    Introduction

    While Thonny can be a bit cumbersome if you already know Python, it does have advantages in being able to provide fundamental file management capability. Its helpful to be able to copy files, list files and folders on the Pico, delete files and rename them. Its biggest issue is that a hardware reset will disconnect the board and reconnecting with the board, causes the board to soft reset. Which prevents you from easily running a main.py program via reset. I have also tested this using the new Arduino Lab for MicroPython and it suffers from the same problem. Very disappointing.

  • 2023-05-23
    RP2040 MicroPython: Making a Web Server

    Where I begin to develop a web server for the RP2040 (Pi Pico and Pi Pico W) using MicroPython and microdot.

    Introduction

    The Pico W added wireless capability to the Pico, which brings the ability to network the Pico board. Once a board can be networked, it becomes valuable to have it serve web pages. An HTTP-compliant web page is a simple first step to using the Pico W via a network.

  • 2023-05-15
    Python: Developing in MicroPython on the RP2040

    A set of entries which comprise a course for learning how develop MicroPython programs for the RP2040.

    Course

    1. RP2040 MicroPython: Getting Started
    2. RP2040 MicroPython: Developing Applications
    3. RP2040 MicroPython: Making a Wireless Connection
    4. RP2040 MicroPython: mpremote
    5. RP2040 MicroPython: Making a Web Server

    Additional Entries (Older Entries)

    1. RP2040 MicroPython Coding Setup
    2. Introducing Adafruit Feather RP2040
    3. RP2040 Blink Continued
    4. Comparing Board and Language Speeds
  • 2023-05-02
    RP2040 MicroPython: Making a Wireless Connection

    Where I illustrate how to establish a wireless connection using the Pi Pico W.

    Introduction

    When the Pico W was introduced, there was finally a great product from Raspberry Pi to compete with the ESP32. The ESP32-based products are good, however, I prefer the Pi Pico-based products due to superior support and documentation due to its ARM Cortex-based architecture. The Pico W added wireless capability to the Pico, which brought the ability to network the Pico board. It also added bluetooth, which will be a different tutorial.

  • 2023-03-05
    Developing in C on the RP2040: Exploring Blink

    Where I develop multiple versions of blink to better understand the timing API and bit-setting hardware API in the Pico C SDK in learning how to program the Pico in C.

    Sources

    • Pico C SDK
    • Raspberry Pi Pico and Pico W
    • Demystifying bitwise operations…

    Introduction

    The Pi Pico family of microcontroller boards have an incredible price/performance ratio. Ranging in price from $4 to $10, the Pico can provide a low-cost, high-performance dual-core Cortex M0-based board with or without wireless or installed headers (for easy breadboarding).

  • 2023-02-27
    Developing in C on the RP2040: macOS

    Updated: Feb 27, 2023: Where I install the tools and frameworks necessary to develop code in C on the RP2040 on a macOS platform.

    Sources

    • Getting Started with Pico
    • Raspberry Pi Pico SDK: Raspberry Pi Pico SDK
    • Raspberry Pi Pico Pinout
    • Shawn Hymel on Digikey

    Introduction

    Just as I did for the Linux platform, in this entry I’ll work through the steps required to be successful with developing code in C for the RP2040 on the Mac. Updated: This entry has been tested on both an Intel 2018 MacBook Pro and a M1 2020 Mac Mini.

  • 2023-02-15
    Using Arduino on the RP2040: Notes

    Introduction

    Where I share various observations as to how to use the Pico with the Arduino software framework and the legacy (~1.8.19) Arduino IDE.

    Pico Reset Button

    While most RP2040 boards will have a Reset button, the Pico does not. Why? To save costs. It also has a micro-USB connector instead of a USB C connector for the same reason. The single best way to ensure your Pico uploads properly (or more accurately) the Arduino IDE uploads to the Pico, properly is to press and hold the Boot/Sel button then unplug and plug-in the Pico. This can be required a great deal when testing I2C and the unplug/plug-in is a bit of a pain.

  • 2023-02-14
    Using Arduino on the RP2040: I2C

    Where I explore how to use the Pico’s abundance of I2C interfaces to create 2 separate I2C instances.

    Sources

    • GitHub Repository

    Introduction

    I have been using the Arduino framework and legacy IDE (1.8.19, not the 2.0 version) to develop code on the Raspberry Pi Pico. The Pico is an incredible board, well worth using due to its outstanding price/performance ratio. For only $4, you can buy a very powerful, very well documented and easily available microcontroller. With the addition of the Arduino framework, it makes using the Pico a simple decision for a lot of Uno projects..

  • 2022

  • 2022-04-19
    Comparing Board and Language Speeds

    Where I compare the execution speeds of different combinations of boards and languages. I will continue to update this post with other languages and processor combinations.

    Table for the impatient

    ucontroller/Speed(MHz) Method* frequency Language
    ATSAMD21/48Mhz Integral .6kHz CircuitPython
    ATSAMD21/48Mhz Integral function .7kHz CircuitPython
    ATSAMD21/48Mhz Library .7kHz CircuitPython
    RP2040/133Mhz Integral function 1.0kHz CircuitPython
    RP2040/133Mhz Library 1.44kHz CircuitPython
    ATmega328/16MHz struct/function pointer 6.1kHz Arduino C++
    ATmega328/16MHz words in an infinite loop 27KHz FlashForth
    ATmega328/16MHz struct/function pointer 55kHz C
    ATmega328/16MHz struct/function pointer 56kHz Arduino C++ w/ native toggle
    ATmega328/16MHz Assembly language toggle 108kHz FlashForth
    ATmega328/16MHz Assembly language toggle inlined 444kHz FlashForth
    RP2040/133Mhz struct/function pointer 578.7kHz C
    RP2040/133Mhz words in an infinite loop 2.841 MHz Mecrisp Forth
    *See text for an explanation of method.

    Introduction

    While writing about CircuitPython and the FIDI board, I was curious as to the execution speed of CircuitPython on a extremely powerful (relative to the AVR ATmega328) ARM M0+ microcontroller. The M0+ is a modern RISC 32-bit processor with a considerable amount of memory, while the ATmega is 20 year old RISC 8-bit processor with a limited amount of memory. That said, one can’t run CircuitPython on ATmega processors, one must use C or Forth.

Page 1 of 2
Copyright © 2025 Lief Koepsel
  • Home
  • Search/Topics
  • Writings
  • About