**Engineering documents will be continuously updated**
# Overview
This is a multi-functional calculator that combines the four functions of a scientific calculator, a digital macro keyboard, a game console, and a full-blooded development version into one machine. At first, it was because I felt that the calculator software purchased by the school was bloated, cumbersome and difficult to use (ti-nspire cough cough), so I started to make a calculator that I thought was perfect. But then a bunch of other features were added, and then it became what it is now. (For more information, please see [https://github.com/shaoxiongduan/sci-calc/](https://github.com/shaoxiongduan/sci-calc/))
**B station collection**
[bilibili](https://space.bilibili.com/2024145114/channel/collectiondetail?sid=1832071)
# Configuration
* ESP32 WROOM32 E Driver.
* Shaft body: Kaihua v1 choc short shaft.
* Screen: 256x64 oled (SSD1322)
* Serial chip CH340C.
* 1000mAh battery + tp4056 + dw01 battery protection, supports use while charging.
* Support microSD card storage program.
# Firmware
![有道截屏翻译结果_1728956876483.png](//image.easyeda.com/pullimage/15IjFWBWtrUsuBQRGXTFQeBxabN7WSnR6ZrqCDjH.png)
# Menu System and UI Components
![图片1.png](//image.easyeda.com/pullimage/pfcoa9wjx3kBysybYuVdhqHkIwabRgrcYdgUGU4z.png)
# Macro Keyboard Program
The program usage part of the macro keyboard is also relatively intuitive. Customized macro keys can be built in the following ways. The 10 keys in the two columns on the right will automatically appear on the screen as the main macro keys.
**Customize a layer of buttons:**
```c++
Macro layout1[5][6] = {
{Macro({'7'}), Macro({'8'}), Macro({'9'}), Macro({'+'}), Macro({KEY_LEFT_GUI, 'c'}, "COPY"), Macro({KEY_LEFT_GUI, 'v'}, "PASTE")},
{Macro({KEY_ESC}), Macro({'/'}), Macro({'*'}), Macro({'-'}), Macro({KEY_LEFT_ALT, KEY_LEFT_GUI, 'c'}, "C_PATH"), Macro({KEY_LEFT_GUI, 'r'}, "CMD+R")},
{Macro({'4'}), Macro({'5'}), Macro({'6'}), Macro({'^'}), Macro({KEY_LEFT_GUI, 'x'}, "CUT"), Macro({KEY_LEFT_GUI, 's'}, "SAVE")},
{Macro({'1'}), Macro({'2'}), Macro({'3'}), Macro({KEY_RETURN}), Macro({KEY_LEFT_GUI, 'h'}, "HIDE"), Macro({KEY_LEFT_GUI, 'n'}, "NEW")},
{Macro({KEY_LAYER_SWITCH}), Macro({'0'}), Macro({'.'}), Macro({KEY_BACKSPACE}), Macro({KEY_F12}, "G_DEC"), Macro()}
};
```
**Initialize the macro keyboard class:**
```c++
MacroPad macroPad({
Layout("standard", layout1),
Layout("layout 2", layout2),
Layout("photoshop", photoshopLayer),
Layout("editing", filmoraLayer),
Layout("obsidian", obsidianLayer)
});
MacropadUI macropadUI(¯oPad);
```
# Install
The firmware of the calculator is developed using vscode+PlatformIO. All programs and configuration files are in github: [github](https://github.com/shaoxiongduan/sci-calc/)
After flashing the program into esp32, it will not run immediately after booting. You need to copy the .bin file underneath to the SD card.
![wpTTF4snBJlSun0Jv8CfPri7Bp1ygweaXX2VoAKq.png](//image.lceda.cn/pullimage/AyBtypbX2N0j6xRwkpvKGPs7SI7iKgxuNyacnmoS.png)
# Function Key Usage
Switch key layer key/shift:
Single press to temporarily switch, like the shift key.
Double press to switch and lock, like caps lock.
Angle switch key: switch between angle system and radian system.
Tab: used to switch between the calculator input box and history records.
# Appearance
The appearance of the calculator is made of stacked acrylic boards, which is mainly composed of a black translucent acrylic board + PCB + bottom transparent acrylic board. It is very sturdy, not expensive, and very easy to assemble. People who have used it say it is good.
| ![1B3jlTEmoc01dBElvEAattYRjgQZC3T3bNYryGee.jpeg](//image.lceda.cn/pullimage/jWZaxgvgcyCQ3Z14rRXDF7LV7Etki4nj68nMyvIW.jpeg) | ![bJvgpifUIqPWcw7UjuZFuUbKCg32TilDX8rJ1VBm.png](//image.lceda.cn/pullimage/LqLbDEuwMPw64f2cNzR69YKAZBAM2CAPttU5Pa1p.png) |
| --- | --- |
# UI
**Calculator**
Supports four basic arithmetic operations, square root, trigonometric functions, and exponential logarithms. Automatic derivation and equation solving may be added in the future.
History record: Used to record calculation formulas. You can also copy the answers in the history record through tab+enter, which greatly improves calculation efficiency and eliminates the need to type out previously calculated formulas by hand.
**Numeric Keypad**
This calculator also functions as a numeric keypad plus 10 customizable macro keys. The defined keys will be displayed on the left side of the screen. You can also set up multi-layer macro buttons so that you can switch the number of layers according to the software you are currently using.
For example:
Programming;
Ps;
And the clip.
| ![bJr2e8FFUMgZnfTsNOqGrpegfnWFsV6ijSWg3vOc.png](//image.lceda.cn/pullimage/abSRzcrQNxIiWCyxUfKRTtKr0ZHKLzUW5hjCGrxk.png) |![AAhI37JdRiUaDvwk9TICYMDrUZKUtYcvbEbZO880.png](//image.lceda.cn/pullimage/Louom5DqvVjf4AZmZfeYzr8ExLcCzxgOBFoJ2jah.png) |
| --- | --- |
| ![t8NTmAkfVlXG8yfX3ZaOER1x7p21iFk7lSjpX9IT.png](//image.lceda.cn/pullimage/u4xyN13H8OtWHzwixgtEtZrUHv6GH1Yh6eNpjhrr.png)|![BS5bGYsVxwqbhpxWft1PRi8D49N9wsAqCnFvHzx6.jpeg](//image.lceda.cn/pullimage/RQknLkpT5DWLgpY3Di1L2crLR6zAJJGNhqy29dgs.jpeg) |
# Upload Program
By saving the .bin file of the compiled program to the microSD card, the calculator will read the file on the card and run it. In order to improve learning efficiency and enhance learning motivation, I transplanted the "learning software" of several big guys:
![a92x622gKCnntoJv4mkV70MD8wbmHbyCUdeqsOdi.png](//image.lceda.cn/pullimage/yY5rGLy9lXZSSTVj2xd7I9uvxW1slVOagLjfmJ9d.png)
# ESP32 Development Version
This calculator leads out the pins of esp32 and can be used as a development board in conjunction with arduino IDE. The pins drawn above can also be connected to expansion modules (I'm lazy and haven't designed it yet).
Please like and follow :)