Skip to content

jsh3lly/wio-terminal-snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍Snake🐍

Note

This project was accepted as an example on the rust atsamd repo. This is the PR which was accepted.

Overview

This project implements the generic snake game for the arm based Wio Terminal embedded system. It was made possible with the help of examples in the atsamd_hal/boards/wio_terminal repository. Some code, say, for pin, display, etc. initializations has been taken from the aforementioned repository. The coordinates for the food cells in the game are generated by a lightweight pseudo-random number generation crate.

Demonstration


If the gif does not load, check it out here!

Controls

The direction of the snake is controlled by the 5-Way-Switch (the round button just below the LCD screen).

Building and Flashing (Linux)

First step would be to add the proper udev rules for flashing. Refer to udev-rules bit of this snippet. Then, you can do:

$ cargo build --release
$ arm-none-eabi-objcopy -O binary target/thumbv7em-none-eabihf/release/snake snake.bin
$ bossac -p ttyACM0 -e -w -v --offset=0x4000 snake.bin 

You may also follow this snippet to help you build and flash the rust program.

License

MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages