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

Dependencies:   mbed SBDBT arrc_mbed

Files at this revision

API Documentation at this revision

Comitter:
sopuranoaruto
Date:
Sun Jan 30 12:27:02 2022 +0000
Commit message:
tapeLED

Changed in this revision

SBDBT.lib Show annotated file Show diff for this revision Revisions of this file
arrc_mbed.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SBDBT.lib	Sun Jan 30 12:27:02 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/m2130/code/SBDBT/#9fd7393a3023
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/arrc_mbed.lib	Sun Jan 30 12:27:02 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/TanakaRobo/code/arrc_mbed/#77c13e86ad12
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Jan 30 12:27:02 2022 +0000
@@ -0,0 +1,27 @@
+#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();
+            }
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Jan 30 12:27:02 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file