### Introduction
> I previously open-sourced a six-key small keyboard with a knob (https://oshwhub.com/pomin/diy-jian-pan), but I didn't expect that the number of views would be so large. Recently, I got a job and finally had time to update and improve this project. The
previous six-key keyboard had a bug that it would be disconnected after running for a long time. It may be inferred that the interrupt priority of CH552 is fixed:
![image.png]

You can see that the priority of the timer 0 interrupt is greater than that of USB. The code uses the software polling execution method. The timer 0 interrupt provides the clock source. It is inferred that the timer 0 interrupted the USB transmission interrupt and caused the disconnection problem. After repairing it, there is no problem now.
This keyboard uses the dial+3 key design. I only heard about the dial some time ago, and then I checked it out... emmmm99.99$... It's also okay... . . .
![image.png]

But what can we do about CH552, this magical USB microcontroller, which can be easily made, hahahaha.
### RGB lighting effect
> The original author used OpenRGB to rewrite the RGB lighting effect. This function is removed here, and the HSV color model is used to drive the RGB lamp for display.
HSV model diagram:
![HSV-color-space-Hue-saturation-value.png]

In the old version of the six-key keyboard, the three RGB color values are gradually reduced to achieve the fade-out effect. The code is relatively bloated. Since it is easier to achieve fade-out or gradient color in the HSV color model, this keyboard uses HSV to express color and HSV to RGB to drive the RGB lamp for display. At present, only multi-color and fade-out effects are implemented in the code.
### The
default function of the three keys is the previous song, pause/play, and next song. The dial function can be searched by itself, which is very nice to use! !
##### The descriptor generation software
can change the manufacturer and device name to your own name! ! , I wrote a generation tool using the imgui interface library and vcpkg (it seems that the support for Chinese is not perfect, and some Chinese characters will be garbled)
![image.png]

Replace the descriptor in the code:
![image.png]

My keyboard, hahaha
![image.png]

### Photos
![1670851192467.jpg]

![1670851210748.jpg]

![IMG_20221212_204250.jpg]