Browse Source

calibrate runs but doesn't work

master
jan 5 years ago
parent
commit
26e34f7671
  1. 5
      .idea/compiler.xml
  2. 355
      .idea/workspace.xml
  3. 5
      src/Camera.java
  4. 9
      src/EuglenaApplet.java
  5. 34
      src/LEDControl.java
  6. 27
      src/ProjectorApplet.java

5
.idea/compiler.xml

@ -14,13 +14,10 @@
<file url="file://$PROJECT_DIR$/src/colorScreen.java" />
<file url="file://$PROJECT_DIR$/src/RotateClass.java" />
<file url="file://$PROJECT_DIR$/src/squareCorridor.java" />
<file url="file://$PROJECT_DIR$/src/LEDtest.java" />
<file url="file://$PROJECT_DIR$/src/Presets.java" />
<file url="file://$PROJECT_DIR$/src/identifyEuglena.java" />
<file url="file://$PROJECT_DIR$/src/unidirectionStim.java" />
<file url="file://$PROJECT_DIR$/src/shrinkingCircle.java" />
<file url="file://$PROJECT_DIR$/src/TriangleClass.java" />
<file url="file://$PROJECT_DIR$/src/EllipseClass.java" />
<file url="file://$PROJECT_DIR$/src/euglena_basic_stimuli.java" />
<file url="file://$PROJECT_DIR$/src/protoClear.java" />
<file url="file://$PROJECT_DIR$/src/gradientWindow.java" />
@ -36,12 +33,10 @@
<file url="file://$PROJECT_DIR$/src/separate.java" />
<file url="file://$PROJECT_DIR$/src/testing.java" />
<file url="file://$PROJECT_DIR$/src/merge.java" />
<file url="file://$PROJECT_DIR$/src/Calibrator.java" />
<file url="file://$PROJECT_DIR$/src/window.java" />
<file url="file://$PROJECT_DIR$/src/snapshot.java" />
<file url="file://$PROJECT_DIR$/src/randomLED.java" />
<file url="file://$PROJECT_DIR$/src/proto488flashraster.java" />
<file url="file://$PROJECT_DIR$/src/RectangleClass.java" />
<file url="file://$PROJECT_DIR$/src/clearDisplay.java" />
<file url="file://$PROJECT_DIR$/src/clearScreen.java" />
<file url="file://$PROJECT_DIR$/src/showCV.java" />

355
.idea/workspace.xml

@ -2,10 +2,12 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="6e752a8c-6cb9-4ef9-9031-0329ce15fcb4" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/compiler.xml" afterPath="$PROJECT_DIR$/.idea/compiler.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Camera.java" afterPath="$PROJECT_DIR$/src/Camera.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/EuglenaApplet.java" afterPath="$PROJECT_DIR$/src/EuglenaApplet.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/LEDControl.java" afterPath="$PROJECT_DIR$/src/LEDControl.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/ProjectorApplet.java" afterPath="$PROJECT_DIR$/src/ProjectorApplet.java" />
</list>
<ignored path="processing-intellij.iws" />
<ignored path=".idea/workspace.xml" />
@ -29,8 +31,8 @@
<file leaf-file-name="euglena_basic_stimuli.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/euglena_basic_stimuli.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="525">
<caret line="318" column="9" selection-start-line="318" selection-start-column="9" selection-end-line="318" selection-end-column="9" />
<state relative-caret-position="759">
<caret line="85" column="29" selection-start-line="85" selection-start-column="29" selection-end-line="85" selection-end-column="29" />
<folding>
<element signature="e#0#16478#0" expanded="true" />
<element signature="imports" expanded="true" />
@ -50,16 +52,16 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="EuglenaApplet.java" pinned="false" current-in-tab="true">
<file leaf-file-name="EuglenaApplet.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/EuglenaApplet.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="443">
<caret line="41" column="24" selection-start-line="41" selection-start-column="24" selection-end-line="41" selection-end-column="24" />
<state relative-caret-position="540">
<caret line="41" column="13" selection-start-line="41" selection-start-column="13" selection-end-line="41" selection-end-column="13" />
<folding>
<element signature="e#322#323#0" expanded="true" />
<element signature="e#367#368#0" expanded="true" />
<element signature="e#411#412#0" expanded="true" />
<element signature="e#448#449#0" expanded="true" />
<element signature="e#349#350#0" expanded="true" />
<element signature="e#394#395#0" expanded="true" />
<element signature="e#438#439#0" expanded="true" />
<element signature="e#475#476#0" expanded="true" />
</folding>
</state>
</provider>
@ -68,41 +70,43 @@
<file leaf-file-name="ProjectorApplet.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/ProjectorApplet.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="31" selection-start-line="0" selection-start-column="31" selection-end-line="0" selection-end-column="31" />
<state relative-caret-position="630">
<caret line="35" column="0" selection-start-line="35" selection-start-column="0" selection-end-line="35" selection-end-column="0" />
<folding>
<element signature="e#216#217#0" expanded="true" />
<element signature="e#275#276#0" expanded="true" />
<element signature="e#316#317#0" expanded="true" />
<element signature="e#339#340#0" expanded="true" />
<element signature="e#394#395#0" expanded="true" />
<element signature="e#453#454#0" expanded="true" />
<element signature="e#755#756#0" expanded="true" />
<element signature="e#828#829#0" expanded="true" />
<element signature="e#871#872#0" expanded="true" />
<element signature="e#945#946#0" expanded="true" />
<element signature="e#992#993#0" expanded="true" />
<element signature="e#1037#1038#0" expanded="true" />
<element signature="e#1084#1085#0" expanded="true" />
<element signature="e#1129#1130#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Camera.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Camera.java">
<file leaf-file-name="LEDControl.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/LEDControl.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="5" column="16" selection-start-line="5" selection-start-column="16" selection-end-line="5" selection-end-column="16" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#957#958#0" expanded="true" />
<element signature="e#983#984#0" expanded="true" />
</folding>
<state relative-caret-position="576">
<caret line="35" column="33" selection-start-line="35" selection-start-column="24" selection-end-line="35" selection-end-column="33" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="LEDControl.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/LEDControl.java">
<file leaf-file-name="Camera.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Camera.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="15" column="16" selection-start-line="15" selection-start-column="16" selection-end-line="15" selection-end-column="16" />
<state relative-caret-position="144">
<caret line="8" column="6" selection-start-line="8" selection-start-column="6" selection-end-line="8" selection-end-column="6" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1002#1003#0" expanded="true" />
<element signature="e#1046#1047#0" expanded="true" />
<element signature="e#1015#1016#0" expanded="true" />
<element signature="e#1041#1042#0" expanded="true" />
</folding>
</state>
</provider>
@ -111,8 +115,8 @@
<file leaf-file-name="Menu.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Menu.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="666">
<caret line="178" column="30" selection-start-line="178" selection-start-column="30" selection-end-line="178" selection-end-column="30" />
<state relative-caret-position="198">
<caret line="20" column="63" selection-start-line="20" selection-start-column="63" selection-end-line="20" selection-end-column="63" />
<folding>
<element signature="imports" expanded="true" />
</folding>
@ -120,22 +124,14 @@
</provider>
</entry>
</file>
<file leaf-file-name="Settings.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Settings.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="54">
<caret line="3" column="20" selection-start-line="3" selection-start-column="20" selection-end-line="3" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="angleGather.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/angleGather.java">
<file leaf-file-name="Calibrator.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Calibrator.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="12" column="0" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
<folding />
<state relative-caret-position="318">
<caret line="38" column="0" selection-start-line="38" selection-start-column="0" selection-end-line="38" selection-end-column="0" />
<folding>
<element signature="e#0#3795#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
@ -165,11 +161,16 @@
<option value="$PROJECT_DIR$/src/euglena_basic_stimuli.java" />
<option value="$PROJECT_DIR$/src/Projector.java" />
<option value="$PROJECT_DIR$/src/heatup.java" />
<option value="$PROJECT_DIR$/src/LEDControl.java" />
<option value="$PROJECT_DIR$/src/Camera.java" />
<option value="$PROJECT_DIR$/src/ProjectorApplet.java" />
<option value="$PROJECT_DIR$/src/Menu.java" />
<option value="$PROJECT_DIR$/src/TriangleClass.java" />
<option value="$PROJECT_DIR$/src/EllipseClass.java" />
<option value="$PROJECT_DIR$/src/RectangleClass.java" />
<option value="$PROJECT_DIR$/src/EuglenaApplet.java" />
<option value="$PROJECT_DIR$/src/Calibrator.java" />
<option value="$PROJECT_DIR$/src/LEDControl.java" />
<option value="$PROJECT_DIR$/lib/core.jar!/processing/core/PApplet.class" />
<option value="$PROJECT_DIR$/src/ProjectorApplet.java" />
</list>
</option>
</component>
@ -207,56 +208,7 @@
<pane id="Scope" />
<pane id="PackagesPane" />
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="processing-intellij" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="processing-intellij" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="eug3" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="processing-intellij" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="eug3" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="processing-intellij" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="eug3" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Presets.java" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.ClassesTreeStructureProvider$PsiClassOwnerTreeNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
<subPane />
</pane>
</panes>
</component>
@ -264,7 +216,7 @@
<property name="last_opened_file_path" value="$PROJECT_DIR$/lib/serial/library/linux64" />
<property name="settings.editor.selected.configurable" value="reference.projectsettings.compiler.excludes" />
<property name="settings.editor.splitter.proportion" value="0.2" />
<property name="project.structure.last.edited" value="Libraries" />
<property name="project.structure.last.edited" value="Problems" />
<property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.2" />
</component>
@ -407,14 +359,14 @@
<editor active="true" />
<layout>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32935917" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.40108892" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32786885" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.26900148" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18503937" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.18503937" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32935917" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2159031" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="true" content_ui="tabs" />
@ -426,6 +378,27 @@
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
<layout-to-restore>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32935917" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="true" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32786885" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18503937" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32935917" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2159031" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
</layout-to-restore>
</component>
<component name="Vcs.Log.UiProperties">
<option name="RECENTLY_FILTERED_USER_GROUPS">
@ -452,10 +425,10 @@
<state relative-caret-position="522">
<caret line="40" column="35" selection-start-line="40" selection-start-column="35" selection-end-line="40" selection-end-column="35" />
<folding>
<element signature="e#322#323#0" expanded="true" />
<element signature="e#367#368#0" expanded="true" />
<element signature="e#411#412#0" expanded="true" />
<element signature="e#448#449#0" expanded="true" />
<element signature="e#349#350#0" expanded="true" />
<element signature="e#394#395#0" expanded="true" />
<element signature="e#438#439#0" expanded="true" />
<element signature="e#475#476#0" expanded="true" />
</folding>
</state>
</provider>
@ -492,10 +465,10 @@
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#322#323#0" expanded="true" />
<element signature="e#367#368#0" expanded="true" />
<element signature="e#411#412#0" expanded="true" />
<element signature="e#448#449#0" expanded="true" />
<element signature="e#349#350#0" expanded="true" />
<element signature="e#394#395#0" expanded="true" />
<element signature="e#438#439#0" expanded="true" />
<element signature="e#475#476#0" expanded="true" />
</folding>
</state>
</provider>
@ -505,10 +478,10 @@
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#322#323#0" expanded="true" />
<element signature="e#367#368#0" expanded="true" />
<element signature="e#411#412#0" expanded="true" />
<element signature="e#448#449#0" expanded="true" />
<element signature="e#349#350#0" expanded="true" />
<element signature="e#394#395#0" expanded="true" />
<element signature="e#438#439#0" expanded="true" />
<element signature="e#475#476#0" expanded="true" />
</folding>
</state>
</provider>
@ -518,10 +491,10 @@
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#322#323#0" expanded="true" />
<element signature="e#367#368#0" expanded="true" />
<element signature="e#411#412#0" expanded="true" />
<element signature="e#448#449#0" expanded="true" />
<element signature="e#349#350#0" expanded="true" />
<element signature="e#394#395#0" expanded="true" />
<element signature="e#438#439#0" expanded="true" />
<element signature="e#475#476#0" expanded="true" />
</folding>
</state>
</provider>
@ -531,10 +504,10 @@
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#322#323#0" expanded="true" />
<element signature="e#367#368#0" expanded="true" />
<element signature="e#411#412#0" expanded="true" />
<element signature="e#448#449#0" expanded="true" />
<element signature="e#349#350#0" expanded="true" />
<element signature="e#394#395#0" expanded="true" />
<element signature="e#438#439#0" expanded="true" />
<element signature="e#475#476#0" expanded="true" />
</folding>
</state>
</provider>
@ -544,10 +517,10 @@
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#322#323#0" expanded="true" />
<element signature="e#367#368#0" expanded="true" />
<element signature="e#411#412#0" expanded="true" />
<element signature="e#448#449#0" expanded="true" />
<element signature="e#349#350#0" expanded="true" />
<element signature="e#394#395#0" expanded="true" />
<element signature="e#438#439#0" expanded="true" />
<element signature="e#475#476#0" expanded="true" />
</folding>
</state>
</provider>
@ -557,10 +530,10 @@
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#322#323#0" expanded="true" />
<element signature="e#367#368#0" expanded="true" />
<element signature="e#411#412#0" expanded="true" />
<element signature="e#448#449#0" expanded="true" />
<element signature="e#349#350#0" expanded="true" />
<element signature="e#394#395#0" expanded="true" />
<element signature="e#438#439#0" expanded="true" />
<element signature="e#475#476#0" expanded="true" />
</folding>
</state>
</provider>
@ -605,73 +578,125 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/ProjectorApplet.java">
<entry file="file://$PROJECT_DIR$/src/TriangleClass.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="31" selection-start-line="0" selection-start-column="31" selection-end-line="0" selection-end-column="31" />
<folding>
<element signature="e#216#217#0" expanded="true" />
<element signature="e#275#276#0" expanded="true" />
<element signature="e#316#317#0" expanded="true" />
<element signature="e#339#340#0" expanded="true" />
</folding>
<state relative-caret-position="684">
<caret line="40" column="3" selection-start-line="40" selection-start-column="3" selection-end-line="40" selection-end-column="3" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Camera.java">
<entry file="file://$PROJECT_DIR$/src/EllipseClass.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="5" column="16" selection-start-line="5" selection-start-column="16" selection-end-line="5" selection-end-column="16" />
<state relative-caret-position="291">
<caret line="70" column="23" selection-start-line="70" selection-start-column="23" selection-end-line="70" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/RectangleClass.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-15">
<caret line="10" column="2" selection-start-line="10" selection-start-column="2" selection-end-line="10" selection-end-column="2" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/snapshot.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="126">
<caret line="7" column="0" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/euglena_basic_stimuli.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="759">
<caret line="85" column="29" selection-start-line="85" selection-start-column="29" selection-end-line="85" selection-end-column="29" />
<folding>
<element signature="e#0#16478#0" expanded="true" />
<element signature="imports" expanded="true" />
<element signature="e#957#958#0" expanded="true" />
<element signature="e#983#984#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/LEDControl.java">
<entry file="jar://$PROJECT_DIR$/lib/core.jar!/processing/core/PApplet.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="94216">
<caret line="6804" column="0" selection-start-line="6804" selection-start-column="0" selection-end-line="6804" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Calibrator.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="15" column="16" selection-start-line="15" selection-start-column="16" selection-end-line="15" selection-end-column="16" />
<state relative-caret-position="318">
<caret line="38" column="0" selection-start-line="38" selection-start-column="0" selection-end-line="38" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1002#1003#0" expanded="true" />
<element signature="e#1046#1047#0" expanded="true" />
<element signature="e#0#3795#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Menu.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="666">
<caret line="178" column="30" selection-start-line="178" selection-start-column="30" selection-end-line="178" selection-end-column="30" />
<state relative-caret-position="198">
<caret line="20" column="63" selection-start-line="20" selection-start-column="63" selection-end-line="20" selection-end-column="63" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/euglena_basic_stimuli.java">
<entry file="file://$PROJECT_DIR$/src/EuglenaApplet.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="525">
<caret line="318" column="9" selection-start-line="318" selection-start-column="9" selection-end-line="318" selection-end-column="9" />
<state relative-caret-position="540">
<caret line="41" column="13" selection-start-line="41" selection-start-column="13" selection-end-line="41" selection-end-column="13" />
<folding>
<element signature="e#0#16478#0" expanded="true" />
<element signature="imports" expanded="true" />
<element signature="e#349#350#0" expanded="true" />
<element signature="e#394#395#0" expanded="true" />
<element signature="e#438#439#0" expanded="true" />
<element signature="e#475#476#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/EuglenaApplet.java">
<entry file="file://$PROJECT_DIR$/src/ProjectorApplet.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="630">
<caret line="35" column="0" selection-start-line="35" selection-start-column="0" selection-end-line="35" selection-end-column="0" />
<folding>
<element signature="e#394#395#0" expanded="true" />
<element signature="e#453#454#0" expanded="true" />
<element signature="e#755#756#0" expanded="true" />
<element signature="e#828#829#0" expanded="true" />
<element signature="e#871#872#0" expanded="true" />
<element signature="e#945#946#0" expanded="true" />
<element signature="e#992#993#0" expanded="true" />
<element signature="e#1037#1038#0" expanded="true" />
<element signature="e#1084#1085#0" expanded="true" />
<element signature="e#1129#1130#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/LEDControl.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="443">
<caret line="41" column="24" selection-start-line="41" selection-start-column="24" selection-end-line="41" selection-end-column="24" />
<state relative-caret-position="576">
<caret line="35" column="33" selection-start-line="35" selection-start-column="24" selection-end-line="35" selection-end-column="33" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Camera.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
<caret line="8" column="6" selection-start-line="8" selection-start-column="6" selection-end-line="8" selection-end-column="6" />
<folding>
<element signature="e#322#323#0" expanded="true" />
<element signature="e#367#368#0" expanded="true" />
<element signature="e#411#412#0" expanded="true" />
<element signature="e#448#449#0" expanded="true" />
<element signature="imports" expanded="true" />
<element signature="e#1015#1016#0" expanded="true" />
<element signature="e#1041#1042#0" expanded="true" />
</folding>
</state>
</provider>

5
src/Camera.java

@ -4,6 +4,7 @@ import processing.video.*;
class Camera {
Capture cam;
PImage latestImage;
/*
Set up a camera.
@ -22,6 +23,8 @@ class Camera {
PApplet.println(cameras[cameraMode]);
this.cam = new Capture(applet, cameras[cameraMode]);
this.cam.start();
this.updateImage();
}
}
@ -35,7 +38,7 @@ class Camera {
return newImageAvailable;
}
Capture getCam() {
PImage getImage() {
return cam;
}

9
src/EuglenaApplet.java

@ -11,6 +11,7 @@ public class EuglenaApplet extends PApplet {
// Software components
Menu menu;
Calibrator calibrator;
public static void main(String args[]) {
PApplet.main("EuglenaApplet");
@ -33,16 +34,20 @@ public class EuglenaApplet extends PApplet {
// Start up projectorApplet window
// Do this last, in case ProjectorApplet wants to use the camera, arduino, etc.
projectorApplet = new ProjectorApplet();
projectorApplet = new ProjectorApplet(this);
String[] args = {"Euglena projector"};
PApplet.runSketch(args, projectorApplet);
}
@Override
public void draw() {
menu.draw(this, ledControl);
//Update webcam and draw the updated image to the screen
camera.updateImage();
imageMode(PApplet.CORNER);
image(camera.getCam(), 0, 0, width - menu.width, height);
image(camera.getImage(), 0, 0, width - menu.width, height);
}

34
src/LEDControl.java

@ -10,23 +10,23 @@ class LEDControl {
LEDControl(PApplet applet, int whichArduino) {
// Arduino - initialize correct arduino
String[] arduinos = Arduino.list();
if (arduinos.length == 0) {
PApplet.println("There are no arduinos available for use.");
applet.exit();
} else {
PApplet.println("Available arduinos:");
for(int i = 0; i < arduinos.length; i++) {
PApplet.println(arduinos[i]);
}
PApplet.print("Using arduino ");
PApplet.println(arduinos[whichArduino]);
this.arduino = new Arduino(applet, arduinos[whichArduino], comRate);
for (Direction dir : Direction.values()) {
this.arduino.pinMode(dir.pin, Arduino.OUTPUT);
}
}
// if (arduinos.length == 0) {
// PApplet.println("There are no arduinos available for use.");
// applet.exit();
// } else {
// PApplet.println("Available arduinos:");
// for(int i = 0; i < arduinos.length; i++) {
// PApplet.println(arduinos[i]);
// }
// PApplet.print("Using arduino ");
// PApplet.println(arduinos[whichArduino]);
//
// this.arduino = new Arduino(applet, arduinos[whichArduino], comRate);
//
// for (Direction dir : Direction.values()) {
// this.arduino.pinMode(dir.pin, Arduino.OUTPUT);
// }
// }
}
boolean isActive(Direction dir) {

27
src/ProjectorApplet.java

@ -7,6 +7,14 @@ class ProjectorApplet extends PApplet {
final static int centerX = 860;
final static int centerY = 540;
EuglenaApplet parent;
Calibrator calibrator;
ProjectorApplet(EuglenaApplet parent) {
this.parent = parent;
calibrator = new Calibrator(this);
}
public void settings() {
fullScreen(P2D, this.projectorScreenNumber);
}
@ -14,6 +22,7 @@ class ProjectorApplet extends PApplet {
@Override
public void setup() {
clear();
calibrator.activate();
}
@Override
@ -21,5 +30,23 @@ class ProjectorApplet extends PApplet {
background(50);
fill(255);
ellipse(mouseX, mouseY, 10, 10);
calibrator.draw(parent);
}
public float convertXCoord(float x) {
return (x / calibrator.magx + width * calibrator.offsetx);
}
public float convertYCoord(float y) {
return (y / calibrator.magy + height * calibrator.offsety);
}
public float convertXDistance(float dx) {
return (dx / calibrator.magx);
}
public float convertYDistance(float dy) {
return (dy / calibrator.magy);
}
}
Loading…
Cancel
Save