Giter Club home page Giter Club logo

chandelier's Introduction

Artistic installation project "Chandelier"

Chandelier installation

Main idea

We wanted to create interactive sequence about schizophrenia related topics.

It is made made from:

  • Raspberry Pi 3 Model A+
  • 4 pin RGB LED strip
  • 2 MOSFET transistors
  • 3 movement sensors
  • jack connected, earphone-shaped speaker
  • bluetooth speaker
  • bluetooth remote button

Main steps of sequence are:

  1. White, pulsing light, ambient sounds from bt speaker - waiting for movement

  2. Movement - telephone ring bell from bt speaker, red light, waiting for button push

  3. After button push - psychodelic voice from jack speaker, red pulsing light, waiting for another button push

  4. If push last:

    • > 3 sec - You lose, information about schizophrenia from bt speaker, red light

    • < 3 sec - You win, information about schizophrenia from bt speaker, white light

  5. Break between sequences, ambient sounds from bt speaker, white pulsing lights

  6. Repeat

Main problems:

  1. Not commented, messy code. It was written by one person in quite limited amount of time. But it is recoverable messy, it will be cleaned if we will be continuing our project.
  2. Bluetooth button - one hell ride with it - this technology it's not meant to be used on "wait long for input" mode. Remote is getting constantly disconnected. This is main reason why main program looks like it looks. In next iteration we will surely switch for cable-connected button and maybe speaker too.
  3. Movement sensors are too sensitive, we couldn't placed it in way that no sensor won't instantly sense a movement. Because of that we decided to add hardcoded pause between waiting for movement and continuing. On top of that I had to change mode of detecting - reacting to change from 0 (not detecting) to 1 (detecting) was replaced by just checking if even one sensor send 1.
  4. It was my playground for learning how to write someting asynchronized and multi-threaded.
  5. Using VLC python library - as much as it was the simplest sound player that I could find, later I would rather switch to something lighter.

Main features

  1. Search, trust, pair, disconnect after error (with possibilty of retries) with bluetooth device using bluetoothctl. After all it wasn't best choice to write this in python, it's look very messy. Bash scripts would fit much more. Unfortunatelly I didn't find any python library to get that much easy control of bluetooth like from bluetoothctl.
  2. Get pulse-audio sink from bluetooth speaker to later use it.
  3. Asynchronized waiting for bt button push.
  4. Managing pulse-audio sinks, possibility to create combined one.
  5. Control rgb led light using MOSFET transistor. We had only two because we wanted either only red or white light.
  6. Asynchronized waiting for movment detection.

Usage

  1. Install VLC
  2. pip install -r requirments.txt
  3. From main directory: pip install .
  4. python[3] -m chandelier

chandelier's People

Contributors

akotwica avatar martwyjez avatar

Watchers

 avatar

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.