Skip to content

Megumism/ArduinoBand

Repository files navigation

Manual of Garbage Band

Keyboard Changes

1 2 3 backspace
4 5 6 up
7 8 9 down
b 0 # enter

Song

Welcome

   Welcome to
  Garbage Band

menu

     *:Song
     #:Game

press * or # to choose the one you like

getTone

Tone:
bE

ps:

when you finish, please press D to enter
please use 'B' and 'C' to change the tone
'B' means UP, 'C' means DOWN
'*' means b (flat), '#' means # (sharp)

getPace

BPM:
120

BPM means beat per minute
when you finish, please press D to enter
use A to delete

Metre:
3/4

Metre is just metre

when you finish, please press D to enter
use B and C to change from left to right

getMusic

Your song:
Note:b7 Beat:3

b7 is what we call B-flat, si

use B and C to change from left to right
use A to delete

Recording

 Recording...

show "Recording..." for a second

Play the music

1--- 2|
1 2 3-|
5 --- |

show the score while playing the music
the score is scrolling automatically from upside to downside

Show the score

1--- 2|
1 2 3-|

please use B and C to scroll manually and view your work
when finished, press D to go back to the menu

Game

haven't finished yet...

for developer

本地位置

  由于Arduino过于“人性化”的设计,导致无法在一般位置实现头文件的引用,而只能引用三种位置的头文件。(具体参见https://www.arduino.cc/en/Guide/Libraries)本项目采用的是Sketch位置的方法,因此,本项目需要放在X:\Users\xxx\Documents\Arduino\libraries下进行开发,而且头文件不能再放进二级目录,否则Arduino的编译器会找不到。

  另外其实有非常暴力的开发方法,就是直接在main.ino的兄弟位置写一个ino文件(不要包含loopsetup,然后Arduino会自动把他们链接在一起,但这样比较愚蠢,只是把一个文件砍几段放而已。而且会让Intellisense感到混乱。

命名规范

  所有单独调试的文件(也就是直接可以上传运行的)命名为**_o.ino,放在individual文件夹中。建立好类库之后提出来去掉_o的后缀。

keyboard44.ino

  • 初始化函数需要八个参数,对应键盘从左到右的针脚位置,可以缺省,默认为4~11。
  • 接口函数是char keyboard44::getKey();
  • 可以通过setKey函数更改针脚对应键值,默认是矩阵下标值。

附:键的功能

1 2 3 backspace
4 5 6 up
7 8 9 down
b 0 # enter

About

伟大的工程实践大作业

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages