Introduction: A Small and Cheap Pocket Computer That Can Be Programmed Anywhere.
You can turn CardKB into a pocket computer!
Complete pocket computer for CardKB using ArduinoBaisc, CardKB, I2C OLED screen. Since BASIC uses ArduinoBasic ( https://github.com/robinhedwards/ArduinoBASIC ), it supports almost all normal functions such as float and string variables, multidimensional arrays, FOR-NEXT, GOSUB-RETURN, etc. To do. Save and load from EEPROM is supported. The BASIC program and variables use about 1k of RAM, so it is almost equivalent to the first computer (Sinclair ZX81). The other 1k of RAM is used for the keyboard and screen buffer, and there is a little room for the CPU stack. Since arduino has a 1k EEPROM, if the program fits in the basic environment, it will fit in the EEPROM.
Supplies
1) CardKB(https://en.aliexpress.com/item/32963872643.html)
2) I2C OLED (eg SSD1306 128x32 or 128x64)
3) mini breadboard
4) Battery box
5) EEPROM (eg 24LC256) (Option)
Step 1: Prerequisites
- Use CardKB Mini Keyboard. Please refer to https://en.aliexpress.com/item/32963872643.html for details.
- SSD1306 based OLED screen connected using I2C. The 128x32 version works fine-change some definitions. ArduinoBasic uses SPI OLED, but pocket computers using CardKB use I2C OLED.
- (Optional) Use an external EEPROM (eg 24LC256) to save multiple files.
Assembly is very easy. CardKB, OLED and EEPROM can be connected by I2C using a mini breadboard. I put a picture of CardKB cable information.
Step 2: Program and Compilation
- Download the program from here.
- Put SSD1306ASCII under "\ Arduino \ libraries" folder.
- Adafruit NeoPixel library is required.
Select "ATmega328p (3.3V, 8Mhz)" when compiling. If not selected, the NeoPixel LED will remain lit white.
Select "Export compiled Binary" to create a writing file.
Step 3: Write Program
Write a binary compiled using tools such as avrdude or avrdude-GUI and USB ISP.
I created a tool that writes to CardKB. You must use jumper pins instead of tools.
Do not rewrite the CardKB fuse bit.
Step 4: Please Correct SSD1306ASCII_I2C.h As Follows.
<OLED 128 × 32>
#define OLED_WIDTH 128 #define OLED_HEIGHT 32 #define OLED_COLMAX 21 #define OLED_ROWMAX 4
<OLED 128×64>
#define OLED_WIDTH 128 #define OLED_HEIGHT 64 #define OLED_COLMAX 21 #define OLED_ROWMAX 8
Step 5: Finish
have fun:-)