Code Monkey home page Code Monkey logo

pianostep's Introduction

pianoStep

ふつうの階段をピアノにしてみたんですよ

動作環境

回路

  • 12個(段数分)の距離センサをArduinoのA2〜A13に配線
  • 電源と出力安定のため5v-GND間とAin-GND間にそれぞれバイパスコンデンサをつける
  • テープLEDの電源を供給する(長さと明るさによって必要な電流量が変化する、詳細

Arduino

  • Arduinoのインストール
  • git clone [email protected]:farundorL/pianoStep.git
  • Arduino(Mega)を接続して pianoStep/arduino/pianoStep/pianoStep.ino を書き込む
  • Arduinoに距離センサとテープLEDを繋ぐ
  • RaspberryPiに刺す

Raspberry Pi

  • スピーカーを繋ぐ
  • sudo apt-get install ruby-dev
  • git clone [email protected]:farundorL/pianoStep.git
  • cd pianoStep/raspberry
  • bundle install
  • ruby steppiano.rb /dev/ttyACM0 でArduinoのシリアルポートを引数として実行する

ログ解析

  • ディレクトリが作られていれば、log/yyyy/m/d/h/min に反応した段を記録しています
  • 1日のログを10分毎に集計したものがこれです
  • cd pianoStep/raspberry/analysis でログ解析するディレクトリに移動します
  • ./calculateLog.sh でtmpフォルダを作り各段ごとの一時ログを作成
  • ruby analysisStep.rb YYYY-MM-DD で指定した年月日のログをstepLog.csvとして保存
  • ./cleanTemp.sh でtmpフォルダを消します(rmするだけ)

pianostep's People

Contributors

gyamoto avatar

Watchers

 avatar  avatar  avatar

Forkers

itibanbosi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.