Skip to content
Blaarkies edited this page Mar 3, 2025 · 3 revisions

Starter Project for Raspberry Pi Pico

This project serves as a base starter project for anyone looking to build a program for their Pico micro-controller.

Project Design Philosophy

  • Simple enough for beginners new to javascript, or even those new to programming
  • Robust enough for experts to build their project on top of this, or even using typescript with a team to prevent type mismatches
  • Generic helper utilities and classes to simplify working with hardware components
    • Exceptions are made for non-generic but very popular components such as the WS2812 (NeoPixel)
    • Classes encapsulate logic specific to hardware components
    • Common functions expose methods for data manipulation

Future Additions

  • PID loop controller
  • Audio input/output handler
  • LCD display class

FAQ

  • Why javascript?
    • Great at handling asynchronous event driven code with a simple syntax
    • Low barrier to entry programming language. It runs even before the coder understands data types
  • Why RxJS for ReactiveX?
    • JS Promises are not enough to handle complex events that are in turn dependent on others
  • Unit testing with Simulated Controllers, what are those?
    • These keep a log of all native method calls that happened during the unit test spec
    • Coding for 10 or more GPIO pins leads to the same native method (e.g. pinMode()) being called multiple times in a constructor method. This is difficult to mock and check the expected value among these calls afterwards.
    • This allows us to easily mock the return values per specific pin
  • When Pico Wi-Fi?
    • KalumaJS supports a firmware version for Pico W
      • v1.1.0 has some issue with HTTP GET requests to a local IP, but DNS requests are fine (or hosting an http.server on the Pico W)
    • Some differences need to be accounted for, such as no GPIO25 pin for the LED. It requires importing the pico_cyw43 module to toggle the green LED

Clone this wiki locally