Permalink
Browse files

First Push

  • Loading branch information...
1 parent e1acd26 commit bbe64eecfd909f699b390adf0ab45f6cb4d54904 @conorrussomanno conorrussomanno committed Jun 16, 2016
Showing with 475,393 additions and 0 deletions.
  1. BIN GUI.jpg
  2. +17 −0 OpenBCI_GUI/AndroidManifest.xml
  3. +196 −0 OpenBCI_GUI/Button.pde
  4. +583 −0 OpenBCI_GUI/ChannelController.pde
  5. +792 −0 OpenBCI_GUI/ControlPanel.pde
  6. +717 −0 OpenBCI_GUI/EEG_Processing.pde
  7. +928 −0 OpenBCI_GUI/Gui_Manager.pde
  8. +1,040 −0 OpenBCI_GUI/HeadPlot.pde
  9. +58 −0 OpenBCI_GUI/HelpWidget.pde
  10. +186 −0 OpenBCI_GUI/MenuList.pde
  11. +1,000 −0 OpenBCI_GUI/OpenBCI_ADS1299.pde
  12. +1,382 −0 OpenBCI_GUI/OpenBCI_GUI.pde
  13. +382 −0 OpenBCI_GUI/ParseKey.pde
  14. +122 −0 OpenBCI_GUI/Playground.pde
  15. +106 −0 OpenBCI_GUI/Presentation.pde
  16. +107 −0 OpenBCI_GUI/SDConverter.pde
  17. +3,473 −0 OpenBCI_GUI/SavedData/Sample_Data/SDconverted-2014-10-22_16-27-06.txt
  18. +3,473 −0 OpenBCI_GUI/SavedData/Sample_Data/SDconverted-2014-10-22_17-39-29.txt
  19. +4 −0 OpenBCI_GUI/SavedData/Sample_Data/notes_2013-12-24_meditation.txt
  20. +4 −0 OpenBCI_GUI/SavedData/Sample_Data/notes_2013-12-24_relaxation.txt
  21. +326,761 −0 OpenBCI_GUI/SavedData/Sample_Data/openBCI_2013-12-24_meditation.txt
  22. +125,131 −0 OpenBCI_GUI/SavedData/Sample_Data/openBCI_2013-12-24_relaxation.txt
  23. +414 −0 OpenBCI_GUI/ScatterTrace.pde
  24. +178 −0 OpenBCI_GUI/Spectrogram.pde
  25. BIN OpenBCI_GUI/data/CourierNewPSMT-24.vlw
  26. +18 −0 OpenBCI_GUI/data/electrode_positions_12elec_scalp9.txt
  27. +18 −0 OpenBCI_GUI/data/electrode_positions_default.txt
  28. +18 −0 OpenBCI_GUI/data/electrode_positions_maker_faire_2013.txt
  29. BIN OpenBCI_GUI/data/fonts/Montserrat-Bold.otf
  30. BIN OpenBCI_GUI/data/fonts/Montserrat-Light.otf
  31. BIN OpenBCI_GUI/data/fonts/Montserrat-Regular.otf
  32. BIN OpenBCI_GUI/data/fonts/Montserrat-SemiBold.otf
  33. BIN OpenBCI_GUI/data/fonts/Montserrat-UltraLight.otf
  34. BIN OpenBCI_GUI/data/fonts/OpenSans-Light.ttf
  35. BIN OpenBCI_GUI/data/fonts/OpenSans-Regular.ttf
  36. BIN OpenBCI_GUI/data/fonts/OpenSans-Semibold.ttf
  37. BIN OpenBCI_GUI/data/fonts/Raleway-Regular.otf
  38. BIN OpenBCI_GUI/data/fonts/Raleway-SemiBold.otf
  39. BIN OpenBCI_GUI/data/logo.png
  40. BIN OpenBCI_GUI/data/logo2.png
  41. BIN OpenBCI_GUI/data/prez-images/DemocratizationOfNeurotech.001.jpg
  42. BIN OpenBCI_GUI/data/prez-images/DemocratizationOfNeurotech.002.jpg
  43. BIN OpenBCI_GUI/data/prez-images/DemocratizationOfNeurotech.003.jpg
  44. BIN OpenBCI_GUI/data/prez-images/DemocratizationOfNeurotech.004.jpg
  45. BIN OpenBCI_GUI/data/prez-images/DemocratizationOfNeurotech.005.jpg
  46. BIN OpenBCI_GUI/data/prez-images/DemocratizationOfNeurotech.006.jpg
  47. BIN OpenBCI_GUI/data/prez-images/DemocratizationOfNeurotech.007.jpg
  48. BIN OpenBCI_GUI/data/prez-images/DemocratizationOfNeurotech.008.jpg
  49. BIN OpenBCI_GUI/data/prez-images/DemocratizationOfNeurotech.009.jpg
  50. BIN OpenBCI_GUI/data/prez-images/DemocratizationOfNeurotech.010.jpg
  51. BIN OpenBCI_GUI/data/prez-images/DemocratizationOfNeurotech.011.jpg
  52. BIN OpenBCI_GUI/data/prez-images/DemocratizationOfNeurotech.012.jpg
  53. BIN OpenBCI_GUI/data/prez-images/DemocratizationOfNeurotech.013.jpg
  54. BIN OpenBCI_GUI/data/prez-images/DemocratizationOfNeurotech.014.jpg
  55. BIN OpenBCI_GUI/data/prez-images/DemocratizationOfNeurotech.015.jpg
  56. +180 −0 OpenBCI_GUI/dataFiles.pde
  57. +175 −0 OpenBCI_GUI/dataTypes.pde
  58. +166 −0 OpenBCI_GUI/math.pde
  59. +7,764 −0 OpenBCI_GUI/output/source/OpenBCI_GUI.java
View
BIN GUI.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package=""
+ android:versionCode="1"
+ android:versionName="1.0">
+ <uses-sdk android:minSdkVersion="10" />
+ <application android:label=""
+ android:icon="@drawable/icon"
+ android:debuggable="true">
+ <activity android:name="">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+</manifest>
View
@@ -0,0 +1,196 @@
+
+////////////////////
+//
+// This class creates and manages a button for use on the screen to trigger actions.
+//
+// Created: Chip Audette, Oct 2013.
+// Modified: Conor Russomanno, Oct 2014
+//
+// Based on Processing's "Button" example code
+//
+////////////////////
+
+class Button {
+
+ int but_x, but_y, but_dx, but_dy; // Position of square button
+ //int rectSize = 90; // Diameter of rect
+
+ color currentColor;
+ color color_hover = color(127, 134, 143);//color(252, 221, 198);
+ color color_pressed = color(150,170,200); //bgColor;
+ color color_highlight = color(102);
+ color color_notPressed = color(255); //color(227,118,37);
+ color buttonStrokeColor = bgColor;
+ color textColorActive = color(255);
+ color textColorNotActive = bgColor;
+ color rectHighlight;
+ boolean drawHand = false;
+ //boolean isMouseHere = false;
+ boolean buttonHasStroke = true;
+ boolean isActive = false;
+ boolean isDropdownButton = false;
+ boolean wasPressed = false;
+ public String but_txt;
+ PFont buttonFont = f2;
+
+ public Button(int x, int y, int w, int h, String txt, int fontSize) {
+ setup(x, y, w, h, txt);
+ //println(PFont.list()); //see which fonts are available
+ //font = createFont("SansSerif.plain",fontSize);
+ //font = createFont("Lucida Sans Regular",fontSize);
+ // font = createFont("Arial",fontSize);
+ //font = loadFont("SansSerif.plain.vlw");
+ }
+
+ public void setup(int x, int y, int w, int h, String txt) {
+ but_x = x;
+ but_y = y;
+ but_dx = w;
+ but_dy = h;
+ setString(txt);
+ }
+
+ public void setString(String txt) {
+ but_txt = txt;
+ //println("Button: setString: string = " + txt);
+ }
+
+ public boolean isActive() {
+ return isActive;
+ }
+
+ public void setIsActive(boolean val) {
+ isActive = val;
+ }
+
+ public void makeDropdownButton(boolean val) {
+ isDropdownButton = val;
+ }
+
+ public boolean isMouseHere() {
+ if ( overRect(but_x, but_y, but_dx, but_dy) ) {
+ cursor(HAND);
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ color getColor() {
+ if (isActive) {
+ currentColor = color_pressed;
+ } else if (isMouseHere()) {
+ currentColor = color_hover;
+ } else {
+ currentColor = color_notPressed;
+ }
+ return currentColor;
+ }
+
+ public void setCurrentColor(color _color){
+ currentColor = _color;
+ }
+
+ public void setColorPressed(color _color) {
+ color_pressed = _color;
+ }
+ public void setColorNotPressed(color _color) {
+ color_notPressed = _color;
+ }
+
+ public void setStrokeColor(color _color) {
+ buttonStrokeColor = _color;
+ }
+
+ public void hasStroke(boolean _trueORfalse) {
+ buttonHasStroke = _trueORfalse;
+ }
+
+ boolean overRect(int x, int y, int width, int height) {
+ if (mouseX >= x && mouseX <= x+width &&
+ mouseY >= y && mouseY <= y+height) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public void draw(int _x, int _y) {
+ but_x = _x;
+ but_y = _y;
+ draw();
+ }
+
+ public void draw() {
+ //draw the button
+ fill(getColor());
+ if (buttonHasStroke) {
+ stroke(buttonStrokeColor); //button border
+ } else {
+ noStroke();
+ }
+ // noStroke();
+ rect(but_x, but_y, but_dx, but_dy);
+
+ //draw the text
+ if (isActive) {
+ fill(textColorActive);
+ } else {
+ fill(textColorNotActive);
+ }
+ stroke(255);
+ textFont(buttonFont); //load f2 ... from control panel
+ textSize(12);
+ textAlign(CENTER, CENTER);
+ textLeading(round(0.9*(textAscent()+textDescent())));
+ // int x1 = but_x+but_dx/2;
+ // int y1 = but_y+but_dy/2;
+ int x1, y1;
+ //no auto wrap
+ x1 = but_x+but_dx/2;
+ y1 = but_y+but_dy/2;
+ text(but_txt, x1, y1);
+
+ //draw open/close arrow if it's a dropdown button
+ if (isDropdownButton) {
+ pushStyle();
+ fill(255);
+ noStroke();
+ // smooth();
+ // stroke(255);
+ // strokeWeight(1);
+ if (isActive) {
+ float point1x = but_x + (but_dx - ((3f*but_dy)/4f));
+ float point1y = but_y + but_dy/3f;
+ float point2x = but_x + (but_dx-(but_dy/4f));
+ float point2y = but_y + but_dy/3f;
+ float point3x = but_x + (but_dx - (but_dy/2f));
+ float point3y = but_y + (2f*but_dy)/3f;
+ triangle(point1x, point1y, point2x, point2y, point3x, point3y); //downward triangle, indicating open
+ } else {
+ float point1x = but_x + (but_dx - ((3f*but_dy)/4f));
+ float point1y = but_y + (2f*but_dy)/3f;
+ float point2x = but_x + (but_dx-(but_dy/4f));
+ float point2y = but_y + (2f*but_dy)/3f;
+ float point3x = but_x + (but_dx - (but_dy/2f));
+ float point3y = but_y + but_dy/3f;
+ triangle(point1x, point1y, point2x, point2y, point3x, point3y); //upward triangle, indicating closed
+ }
+ popStyle();
+ }
+
+ if (true) {
+ if (!isMouseHere() && drawHand) {
+ cursor(ARROW);
+ drawHand = false;
+ verbosePrint("don't draw hand");
+ }
+ //if cursor is over button change cursor icon to hand!
+ if (isMouseHere() && !drawHand) {
+ cursor(HAND);
+ drawHand = true;
+ verbosePrint("draw hand");
+ }
+ }
+ }
+};
Oops, something went wrong.

0 comments on commit bbe64ee

Please sign in to comment.