Skip to main content

Petal Series Rotary Potentiometer Module

Product Overview

It is an analog potentiometer with a rotation angle of 300°, which outputs an analog value ranging from 0 to 1023 based on its rotation angle.

Specifications

NameIllustration
Interface TypeHY2.0 4-pin Right-angle Header
Product Dimensions35.8mm x 23.8mm
Product Weight4.4g (excluding packaging and accessories)

Dimension Drawing

Hardware Wiring

Connect the Petal Series Rotary Potentiometer Module to the J1 port of the Petal Base Expansion Board.

Software Programming

Create a New Project and Add Extensions

Go to makecode.microbit.org, and click New Project.

Enter a project name in the pop-up window and click Create.

Click Extensions in the code drawer.

Enter petal in the pop-up interface and click the search icon. Click the petal software library when it is displayed.

Sample Program

Program Link: https://makecode.microbit.org/_Uspag6JwAK8P

You can also download the program directly through the webpage below.

Download the Program

Connect your PC and micro:bit V2 with a USB cable.

After a successful connection, a drive named MICROBIT will be detected on your computer.

Click the icon in the bottom left corner, and select Connect Device.

Click.

Click.

Select BBC micro:bit CMSIS-DAP in the pop-up window, then click Connect. At this point, your micro:bit is successfully connected.

Click Download Program.

Result

Rotate the rotary potentiometer, and the LED matrix on the micro:bit will display the current reading of the potentiometer.