Piunora

by Diodes Delight

A tiny-but-mighty open-source carrier board for the Raspberry Pi CM4

View all updates Apr 09, 2021

Prototyping Can Be Fun & Easy!

by Timon

There are some really cool things you can do when you combine an electronics dev board with a Linux SoC! Today, I want to show you how easy it is to prototype with Piunora by making a sensor-based game controller. In the demo below, we are using Adafruit Blinka (a library that enables CircuitPython code on Linux) and an Adafruit VCNL4040 distance sensor attached by a single cable to Piunora’s Qwiic/Stemma-QT connector. No breadboards or soldering required!

For this demo, all I had to do is write a few lines of code to generate keypresses based on sensor input. That way you can build a controller that is compatible with existing games, such as the Chromium Dinosaur Game shown above. If you write your own games, you can achieve some really interesting game mechanics by integrating "analog" distance value directly.

Below is the code for this demo in its entirety. (I also control a NeoPixel to provide some visual indication as to how close my hand was to the sensor.)

import math
import time
import board
import busio
import adafruit_vcnl4040
import neopixel
import simpleio
import keyboard

pixels = neopixel.NeoPixel(board.D12, 1, brightness=0.2)
i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_vcnl4040.VCNL4040(i2c)

while True:
    print("Proximity:", sensor.proximity)
    pixels.fill((0, math.floor(simpleio.map_range(sensor.proximity,3,200,0,255)), 0))

    if sensor.proximity > 6:
    	keyboard.press('space')
    	pass
    else:
    	keyboard.release('space')

About the Author

Timon

timonsku  ·  timonsku


$18,042 raised

of $15,000 goal

120% Funded! Order Below

Product Choices

$39

Piunora Pro

A compact, feature-rich CM4 carrier board


$30

Piunora Lite

Perfect if you need the slimmest possible form factor. Includes all features of Piunora Pro except for the camera connector and the PCI-e M.2 port.


$14

M.2 B-Key 2280 Extender

Expands Piunora's M.2 port to accommodate full-length 2280 peripherals. Keep in mind that such devices are quite a bit longer than Piunora itself, so they might look a little awkward hanging off the end there. But, if you have a cool idea that depends on a 2280 M.2 accessory...this is the product for you.


$37

Raspberry Pi CM4 (Lite, Wireless, 1 GB RAM)

From the Crowd Supply Basics project.

Something for your Piunora to carry.

This CM4101000 variant of the Raspberry Pi Compute Module 4 is a System on Module (SoM) containing an ARM quad-core Cortex-A72 processor, 1 GB RAM, 2.4 and 5 GHz 802.11b/g/n/ac Wi-Fi and Bluetooth 5.0, and supporting power circuitry. Does not include eMMC flash.


$49

Raspberry Pi CM4 (8 GB eMMC, Wireless, 2 GB RAM)

From the Crowd Supply Basics project.

Something for your Piunora to carry.

This CM4102008 variant of the Raspberry Pi Compute Module 4 is a System on Module (SoM) containing an ARM quad-core Cortex-A72 processor, 2 GB RAM, 2.4 and 5 GHz 802.11b/g/n/ac Wi-Fi and Bluetooth 5.0, 8 GB eMMC flash, and supporting power circuitry. With this eMMC variant of the CM4, the SD Card interface is not usable.


$15

Heatsink for CM4

You can operate the CM4 without a heatsink just fine, but if you have some extra-heavy computation to do, then a heatsink can help prevent thermal throttling of the SoC. Includes a mounting footprint for a 30 mm fan (not included) should you want to integrate it into an enclosure or take your CM4 to even greater extremes of computation. Also includes a set of stacking pin headers to accommodate expansion boards.


$10

microSD Card

From the Crowd Supply Basics project.

Boot media for the "Lite" (CM4101000) variant of the CM4. We recommend 64 GB or smaller.

An industrial-grade memory card with extended endurance.


$7

RPi CM4 Wi-Fi Antenna Kit

From the Crowd Supply Basics project.

An omnidirectional 2 dBi gain 2.4/5 GHz Wi-Fi antenna with panel-mounting hardware and an approximately 7.5" (19 cm) cable to connect the antenna's SMA connector to the CM4's U.FL connector. It is "certified for use with the Raspberry Pi Compute Module 4".

Credits

Diodes Delight

An open source hardware company and consultancy


Timon Skerutsch


Makerfabs

Recommended

PCB Fabrication & PCB Assembly

See Also

Subscribe to the Crowd Supply newsletter, highlighting the latest creators and projects: