Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Blockis is similar to Tetris. C99- & J2ME-versions. LED-panel-version (MAX7219) for Raspberry Pi. nCurses-version for Linux/Cygwin

License

NotificationsYou must be signed in to change notification settings

mobluse/blockis

Repository files navigation

Blockis is similar to Tetris. C99- & J2ME-versions included.

The C99-versions of Blockis runs in a terminal (Linux console) oron an 8x8 LED matrix. I made this mainly to educate in C, but also asa preparation for an Arduino-program.

Keys to play: W=Up, A=Left, S=Down=Ins, D=Right, E=PgUp=Del, Q=PgDn=End=Home.

Download using Git (you may need to install Git first):git clone https://github.com/mobluse/blockis
Install in Ubuntu/Raspbian/Debian:cd blockis; ./install.sh and run./blockis and it runs w/o known bugs.It also runs inBash on Ubuntu on Windows for Windows 10, but withsomebugs:Home and End keys don't always work to pause or quit. If you press and hold S, Down or Ins and then release, the game often stops,but can be resumed by pressing the same key again. When you then resume, the block is rotated, becauseit seems as if the key isn't consumed in that case.It also works inBash on Ubuntu on Windows using SSH to a machine with Ubuntu with Blockis and then there is just one bug:Home and End keys never work.

It is also possible to install in Cygwin, but you have to install GCC and some libraries manually using setup-x86_64.exe, thenyou can run./install.sh.In Cygwin Blockis has one bug: If you press and hold S, Down or Ins and then release, the block continues to fall fast for a while,and even after a new block.It also works in Cygwin using SSH to a machine with Ubuntu with Blockis and then it's bug-free, just as in real Ubuntu or Raspbian.

The version of Blockis using an SPI-LED matrix will only work on a Raspberry Pi, and it will not even compile in Cygwin,due to missing header files.

A video of the running nCurses program:https://youtu.be/RkcHImd9MX0
A video of the running 8x8 LED matrix program:https://youtu.be/O5Xhr-NHvAw

How to connect the 8x8 LED matrix to the GPIO-pins of a Raspberry Pi:

Board PinNameRemarksRPi PinRPi Function
1VCC+5V Power25V0
2GNDGround6GND
3DINData In19GPIO 10 (MOSI)
4CSChip Select24GPIO 8 (SPI CE0)
5CLKClock23GPIO 11 (SPI CLK)
(Table fromhttps://github.com/rm-hull/max7219.)

Discuss this resource in Swedish (på svenska):https://groups.google.com/forum/#!topic/coderdojo-lund/5CGq0gMiQac
A video of the 8x8 LED matrix program also exists in Swedish:https://youtu.be/A5NT93l-vrI

About

Blockis is similar to Tetris. C99- & J2ME-versions. LED-panel-version (MAX7219) for Raspberry Pi. nCurses-version for Linux/Cygwin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp