laughteronwater / arduino-brain-machine Goto Github PK
View Code? Open in Web Editor NEWA Light And Sound Machine for the Arduino Uno
Home Page: http://low.li/story/2011/01/arduino-brain-machine
A Light And Sound Machine for the Arduino Uno
Home Page: http://low.li/story/2011/01/arduino-brain-machine
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.
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
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.