If you’re more than 30 years old, then there is a good chance that BASIC (Beginners’ All-purpose Symbolic Instruction Code) was the first programming language you used. Many early computers shipped with a BASIC interpreter in firmware, so it was the first thing users saw when they booted up their computer. While other languages are more useful for most tasks today, BASIC still has benefits. To take advantage of it, Stefan Lenz used a Nano RP2040 Connect to build a standalone computer that runs BASIC for Internet of Things applications.
The Raspberry Pi RP2040 is a powerful microcontroller that immediately became popular after it hit the market in January 2021. The Arduino Nano RP2040 Connect is one of the newest boards in the Arduino lineup and gives users access to the RP2040 within the friendly Arduino ecosystem. In addition the MCU, this board also contains a u-blox WiFi and Bluetooth® adapter, a six-axis IMU, a microphone, 16MB of flash memory, and even a CryptoAuthentication chip. The u-blox adapter was particularly useful for this project, since it enables IoT control over a wireless network.
To turn the Arduino into a complete computer, Lenz connected an ILI9488-based 480×320 TFT LCD screen with built-in SD card slot, a real-time clock, and a PS2 keyboard. The use of the PS2 keyboard eliminated the need for the Arduino to act as a USB host, but the PS2 connection does require a voltage level converter to go from 5V to 3.3V. Lenz also connected a small thermal printer to output logs of sensor data.
Lenz developed his own BASIC interpreter from scratch specifically for Arduinos and other microcontroller development boards. The cool thing about BASIC is that, like Python, the interpreter allows for interactive programming without compilation. This lets users create IoT programs one piece at a time while seeing the results immediately, instead of compiling and flashing each revision.