Update demonstration
This commit is contained in:
parent
ad1941c798
commit
8643aa6fcc
14
README.md
14
README.md
@ -1,10 +1,16 @@
|
|||||||
# Slideshow
|
# Dice game
|
||||||
|
|
||||||
This project is a relatively simple slideshow running on the Adafruit Feather
|
This project is a simple dice-game running on the Adafruit Feather 328P (an
|
||||||
328P (an ATmega328p-microcontroller) using a simple button and a 240x240 LCD
|
ATmega328p-microcontroller) using a simple button and a 240x240 LCD display with
|
||||||
display with the ST7789-driver over
|
the ST7789-driver over
|
||||||
[SPI](https://en.wikipedia.org/wiki/Serial_Peripheral_Interface).
|
[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
|
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
|
the most significant being [`atmega-hal`](https://github.com/Rahix/avr-hal), a
|
||||||
hardware abstraction layer for ATmega-microcontrollers. Images are stored in the
|
hardware abstraction layer for ATmega-microcontrollers. Images are stored in the
|
||||||
|
Binary file not shown.
@ -11,11 +11,12 @@
|
|||||||
use core::ptr::addr_of;
|
use core::ptr::addr_of;
|
||||||
|
|
||||||
use atmega_hal::{
|
use atmega_hal::{
|
||||||
Adc, Usart,
|
Adc, Usart, Wdt,
|
||||||
adc::AdcSettings,
|
adc::AdcSettings,
|
||||||
delay,
|
delay,
|
||||||
spi::{self, Settings},
|
spi::{self, Settings},
|
||||||
usart::Baudrate,
|
usart::{Baudrate, UsartOps},
|
||||||
|
wdt::WdtOps,
|
||||||
};
|
};
|
||||||
use embedded_hal::delay::DelayNs;
|
use embedded_hal::delay::DelayNs;
|
||||||
use panic_halt as _;
|
use panic_halt as _;
|
||||||
@ -114,6 +115,7 @@ fn main() -> ! {
|
|||||||
let mut animation_reached = true;
|
let mut animation_reached = true;
|
||||||
let mut cat_received = false;
|
let mut cat_received = false;
|
||||||
let max_number = 10;
|
let max_number = 10;
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
clock += 1;
|
clock += 1;
|
||||||
if button.poll() {
|
if button.poll() {
|
||||||
|
Loading…
Reference in New Issue
Block a user