Update demonstration

This commit is contained in:
Sofia 2025-09-15 14:17:10 +03:00
parent ad1941c798
commit 8643aa6fcc
3 changed files with 14 additions and 6 deletions

View File

@ -1,10 +1,16 @@
# Slideshow
# Dice game
This project is a relatively simple slideshow running on the Adafruit Feather
328P (an ATmega328p-microcontroller) using a simple button and a 240x240 LCD
display with the ST7789-driver over
This project is a simple dice-game running on the Adafruit Feather 328P (an
ATmega328p-microcontroller) using a simple button and a 240x240 LCD display with
the ST7789-driver over
[SPI](https://en.wikipedia.org/wiki/Serial_Peripheral_Interface).
In the game you roll a number between 1 and 10, and if you get a 10, you are
awarded a picture of a high-quality cat stored in program-memory!
This project is a direct continuation of my earlier
[slideshow](https://git.teascade.net/teascade/slideshow)
This project is written on Rust and uses a very minimal amount of libraries with
the most significant being [`atmega-hal`](https://github.com/Rahix/avr-hal), a
hardware abstraction layer for ATmega-microcontrollers. Images are stored in the

Binary file not shown.

View File

@ -11,11 +11,12 @@
use core::ptr::addr_of;
use atmega_hal::{
Adc, Usart,
Adc, Usart, Wdt,
adc::AdcSettings,
delay,
spi::{self, Settings},
usart::Baudrate,
usart::{Baudrate, UsartOps},
wdt::WdtOps,
};
use embedded_hal::delay::DelayNs;
use panic_halt as _;
@ -114,6 +115,7 @@ fn main() -> ! {
let mut animation_reached = true;
let mut cat_received = false;
let max_number = 10;
loop {
clock += 1;
if button.poll() {