8 releases
Uses new Rust 2024
new 0.3.7 | May 4, 2025 |
---|---|
0.3.6 | May 4, 2025 |
0.3.2 | Apr 30, 2025 |
0.2.0 | Apr 19, 2025 |
#171 in Embedded development
950 downloads per month
110KB
1K
SLoC
Kywy Rust Support
the tiny game device with big possibilities: education, game dev, diy electronics, and more
What is Kywy?
The hardware features:
- a 144x168 LCD screen
- two buttons plus a joystick
- SD card slot
- all day battery life
- I/O: USB-C, GPIO headers, and I2C
The software is designed to give you easy and intuitive access to all of those with only a few lines of code.
Where to buy
Get a kywy on kywy.io
Rust library for Kywy devices
This is an rust library for building out rust programs on the Kywy device it is currently experimental. You can also find the C++/Arduino library on github or in the Ardiuno library manager.
For support, join our discord:
Rust docs
Still in progress
This is a work in progress.
To do:
- Implement display driver (LS013B7DH05)
- Implement button interface
- Implement battery interface
- Implement USB serial and reboot
- Sprites
- Improve battery reading function with real data
- Build game engine
- Add more documentation
- Add more examples/games
- Implement SD-card interface (waiting on shared bus support from embedded-sdmmc)
Build examples
This repo supports vscode environments and code spaces
To build this run:
cargo build --release --target thumbv6m-none-eabi --example <example_name>
replacing <example_name> with one of the .rs files in the examples directory.
To convert to a UF2 file run:
elf2uf2-rs target/thumbv6m-none-eabi/release/examples/<example_name>
you can install elf2uf2-rs by running:
cargo install elf2uf2-rs
(make sure your path is set properly to find the binary)
UF2 file will then be in the directory 'target/thumbv6m-none-eabi/release/examples/'
Uploading UF2 files
Note that your code must use the kywy_usb_from! macro to support automatic rebooting. To do this start a baud 1200 terminal on the device.
You can also put the device into programming mode manually:
- Turn off and unplug the device
- Use a paper clip to press and hold the reset button on the back to the right of the kywy logo
- while holding insert the USB
- wait a second and you should see a usb device. You can now release the button
You can now copy the UF2 to the USB storage device.
Including as a crate from crates.io 
use this to add kywy to a rust project:
cargo add kywy
You will need additional setup files, it may be easier to git clone this repo and make a new example file in it.
Editing your own
You can add an example to build directly from this repository by creating or modifying a file in the examples directory.
to start your own project with minimal configuration, download this repository with git clone https://github.com/KOINSLOT-INC/kywy-rust/
you can then add a new example in the examples directory. Build it with the command above in build examples.
Setup rust
Prerequisites:
- Familiarity with using the terminal, installing programs, and using PATH variables
- Familiarity with using development tools
- Install rust with rust according to the official documents: https://rustup.rs
- Make sure you set your paths for rust and cargo bin
- Install elf2uf2-rs:
cargo install elf2uf2-rs
- Test that elf2uf2-rs is in your path by running elf2uf2-rs
Dependencies
~28–38MB
~506K SLoC