Git Product home page Git Product logo

arduino-brain-machine's Introduction

Repository: Brain Machine for Arduino
Attribution: Chris Sparnicht - Laughter on Water - http://low.li
Creation Date: 2011.01.31
Last Modification Date: 2011.02.15
License: Creative Commons 2.5 Attrib. & Share Alike

Derivation and Notes:
Make sure you have dual wheel potentiometer to reduce
the volume of the audio with your headset. If you don't, 
you might damage your ear drums, your arduino or your headset.
Add a 4.7K ohm resistor from each tone pin to each volume-in
on the potentiometer to further reduce possibility of physical harm.

This arduino sketch is based on the original Sound & Light Machine 
by - Mitch Altman - 19-Mar-07 as featured in Make Magazine 10.
http://makezine.com/10/brainwave/

See notes in code below for how I adapted Mitch Altman's version for Arduino

The sleep coding comes partially from here:
http://www.arduino.cc/playground/Learning/ArduinoSleepCode
***************************************************
2011.02.20
Fixed error in breadboard diagram. 
Added new longer show and gamma frequency (40.4Hz).

2011.02.15
Added liability notice.

2011.02.14
Changed to switch/case format for stage choices.

2011.02.14
Added functions for alternating LED blinking for 
each of the four stages. So now, there are 
eight cases: b, B, a, A, t, T, d, and D.

2011.02.14
I've included a Stereo Eyephone Test sketch 
and a Stereo Tone Test Sketch. These sketches are purely
for development purposes, used to confirm preferred programming
prior to putting it into the Arduino Brain Machine Sketch.

If you're having trouble with Eyephones or Earphones, try
isolating the cause using one of these simpler sketches.

***************************************************
LIABILITY NOTICE:
***************************************************
Light and Sound Machines can be fun for many of us,
but may be seriously dangerous for those prone to siezures. 
When in doubt, seek medical attention. 
You assume all liability for any damage 
done to your own health, those to whom you expose this
technology and/or to your equipment when using any notes
sketches or any associated files within this Git repository.

USE AT YOUR OWN RISK.

arduino-brain-machine's People

Contributors

laughteronwater avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arduino-brain-machine's Issues

Tone library generates inaccurate beat frequencies

The Tone library uses ints (in Hz) to represent frequencies to generate. The original Altman program uses fractional beat frequencies like 2.2Hz. Even though the table contains accurate floating point values for the beat frequencies, the best the current Tone library can do is round to the nearest whole number beat frequency, in Hz.

I implemented a fork which uses raw timers to get around this issue:
https://github.com/palazzol/Arduino-Brain-Machine

pde

I'm glad someone ported Mitch's BM in arduino and put on github but I wonder how to test it.
The includes are not for processing so I wonder Which is the soft needed to use the PDE ?

thanks in advance

Errors when attempting to compile

I'm getting the following errors when attempting to compile for Arduino Uno, any ideas here?

Arduino: 1.8.1 (Mac OS X), Board: "Arduino/Genuino Uno"

In file included from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:28:0,
                 from sketch/brain_machine.ino.cpp:1:
/Users/frank/Documents/Arduino/brain_machine/brain_machine.ino: In function 'void do_brainwave_element(int)':
brain_machine:285: error: 'Index' was not declared in this scope
   char brainChr = pgm_read_byte(&brainwaveTab[Index].bwType);     
                                               ^
brain_machine:294: error: 'Index' was not declared in this scope
       blink_LEDs( pgm_read_dword(&brainwaveTab[Index].bwDuration), 347, 347 );
                                                ^
brain_machine:303: error: 'Index' was not declared in this scope
       alt_blink_LEDs( pgm_read_dword(&brainwaveTab[Index].bwDuration), 347, 347 );
                                                    ^
brain_machine:312: error: 'Index' was not declared in this scope
       blink_LEDs( pgm_read_dword(&brainwaveTab[Index].bwDuration), 451, 450 );
                                                ^
brain_machine:321: error: 'Index' was not declared in this scope
       alt_blink_LEDs( pgm_read_dword(&brainwaveTab[Index].bwDuration), 451, 450 );
                                                    ^
brain_machine:332: error: 'Index' was not declared in this scope
       blink_LEDs( pgm_read_dword(&brainwaveTab[Index].bwDuration), 835, 835 );
                                                ^
brain_machine:343: error: 'Index' was not declared in this scope
       alt_blink_LEDs( pgm_read_dword(&brainwaveTab[Index].bwDuration), 835, 835 );
                                                    ^
brain_machine:352: error: 'Index' was not declared in this scope
       blink_LEDs( pgm_read_dword(&brainwaveTab[Index].bwDuration), 2253, 2253 );
                                                ^
brain_machine:361: error: 'Index' was not declared in this scope
       alt_blink_LEDs( pgm_read_dword(&brainwaveTab[Index].bwDuration), 2253, 2253 );
                                                    ^
brain_machine:370: error: 'Index' was not declared in this scope
       blink_LEDs( pgm_read_dword(&brainwaveTab[Index].bwDuration), 124, 124 );
                                                ^
brain_machine:379: error: 'Index' was not declared in this scope
       alt_blink_LEDs( pgm_read_dword(&brainwaveTab[Index].bwDuration), 124, 124 );
                                                    ^
exit status 1
'Index' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

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.