テープLEDのプログラム 改良により色、光り方などに変化の可能性有り

Dependencies:   mbed SBDBT arrc_mbed play_mp3

シリアル通信可

赤コート -> 赤 青コート -> 青 自動モード -> 黄 手動モード -> 緑

美少女ボイス搭載

シリアル通信に多少のラグが発生する可能性がある。

main.cpp

Committer:
sopuranoaruto
Date:
2022-01-30
Revision:
0:12a2f5f9ab60
Child:
1:677d12692be0

File content as of revision 0:12a2f5f9ab60:

#include "neopixel.h"
#include "sbdbt.hpp"

NeoPixelOut npx(D12,1);
sbdbt sb(A0,A1);
bool mode = 0;

int main(){
    npx.global_scale = 0.5f;
    npx.normalize = false;
    while(1){
        if(sb.select() == 1){
            if(mode == 0){
                mode = 1;
            }else if(mode == 1){
                mode = 0;
            }
        }
            if(mode == 0){
                npx.setPixelColor(0,0xff0000);
                npx.show();
            }else if(mode == 1){
                npx.setPixelColor(0,0x0000ff);
                npx.show();
            }
    }
}