mirror of https://github.com/Trivernis/spydian.git
Merged experimental into master
commit
0b8b72600b
@ -0,0 +1 @@
|
|||||||
|
.idea/
|
@ -1,10 +0,0 @@
|
|||||||
<component name="ProjectDictionaryState">
|
|
||||||
<dictionary name="Trive">
|
|
||||||
<words>
|
|
||||||
<w>adafruit</w>
|
|
||||||
<w>pygame</w>
|
|
||||||
<w>smbus</w>
|
|
||||||
<w>sudo</w>
|
|
||||||
</words>
|
|
||||||
</dictionary>
|
|
||||||
</component>
|
|
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="PYTHON_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager">
|
|
||||||
<content url="file://$MODULE_DIR$" />
|
|
||||||
<orderEntry type="jdk" jdkName="Python 3.6.4 (~/anaconda3/bin/python)" jdkType="Python SDK" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
<component name="TestRunnerService">
|
|
||||||
<option name="projectConfiguration" value="Nosetests" />
|
|
||||||
<option name="PROJECT_TEST_RUNNER" value="Nosetests" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
@ -1,12 +0,0 @@
|
|||||||
<component name="InspectionProjectProfileManager">
|
|
||||||
<profile version="1.0">
|
|
||||||
<option name="myName" value="Project Default" />
|
|
||||||
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
|
||||||
<option name="ignoredIdentifiers">
|
|
||||||
<list>
|
|
||||||
<option value="Adafrouit_PCA9685" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</inspection_tool>
|
|
||||||
</profile>
|
|
||||||
</component>
|
|
@ -1,19 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6.4 (~/anaconda3/bin/python)" project-jdk-type="Python SDK" />
|
|
||||||
<component name="masterDetails">
|
|
||||||
<states>
|
|
||||||
<state key="ScopeChooserConfigurable.UI">
|
|
||||||
<settings>
|
|
||||||
<splitter-proportions>
|
|
||||||
<option name="proportions">
|
|
||||||
<list>
|
|
||||||
<option value="0.2" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</splitter-proportions>
|
|
||||||
</settings>
|
|
||||||
</state>
|
|
||||||
</states>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,828 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ChangeListManager">
|
|
||||||
<list default="true" id="49388e57-2b9e-468a-b880-1d7fb243112d" name="Default" comment="" />
|
|
||||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
|
||||||
<option name="TRACKING_ENABLED" value="true" />
|
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
||||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
||||||
</component>
|
|
||||||
<component name="FavoritesManager">
|
|
||||||
<favorites_list name="für Robotototo" />
|
|
||||||
</component>
|
|
||||||
<component name="FileEditorManager">
|
|
||||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
|
||||||
<file leaf-file-name="install.sh" pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/install.sh">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="136">
|
|
||||||
<caret line="8" column="20" lean-forward="false" selection-start-line="8" selection-start-column="20" selection-end-line="8" selection-end-column="20" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file leaf-file-name="servo_2.py" pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/servo_2.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="102">
|
|
||||||
<caret line="7" column="22" lean-forward="false" selection-start-line="7" selection-start-column="22" selection-end-line="7" selection-end-column="22" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#35#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file leaf-file-name="thermo.py" pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/thermo.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="68">
|
|
||||||
<caret line="5" column="58" lean-forward="false" selection-start-line="5" selection-start-column="58" selection-end-line="5" selection-end-column="58" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#10#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file leaf-file-name="motors.py" pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/motors.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="1734">
|
|
||||||
<caret line="105" column="31" lean-forward="false" selection-start-line="105" selection-start-column="16" selection-end-line="105" selection-end-column="31" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#22#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file leaf-file-name="motor.py" pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/motor.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="1921">
|
|
||||||
<caret line="114" column="0" lean-forward="false" selection-start-line="114" selection-start-column="0" selection-end-line="114" selection-end-column="0" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#23#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file leaf-file-name="main.py" pinned="false" current-in-tab="true">
|
|
||||||
<entry file="file://$PROJECT_DIR$/main.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="340">
|
|
||||||
<caret line="20" column="16" lean-forward="false" selection-start-line="20" selection-start-column="16" selection-end-line="20" selection-end-column="16" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#41#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file leaf-file-name="stream.sh" pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/stream.sh">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="44" lean-forward="false" selection-start-line="0" selection-start-column="44" selection-end-line="0" selection-end-column="44" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file leaf-file-name="gyro_test.py" pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/gyro_test.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="34">
|
|
||||||
<caret line="3" column="31" lean-forward="false" selection-start-line="3" selection-start-column="31" selection-end-line="3" selection-end-column="31" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#11#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file leaf-file-name="ultrasonic.py" pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/ultrasonic.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="493">
|
|
||||||
<caret line="30" column="13" lean-forward="false" selection-start-line="30" selection-start-column="13" selection-end-line="30" selection-end-column="13" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#23#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file leaf-file-name="ultrasonic_test.py" pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/ultrasonic_test.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="85">
|
|
||||||
<caret line="5" column="14" lean-forward="false" selection-start-line="5" selection-start-column="14" selection-end-line="5" selection-end-column="14" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
</leaf>
|
|
||||||
</component>
|
|
||||||
<component name="FileTemplateManagerImpl">
|
|
||||||
<option name="RECENT_TEMPLATES">
|
|
||||||
<list>
|
|
||||||
<option value="Python Script" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="IdeDocumentHistory">
|
|
||||||
<option name="CHANGED_PATHS">
|
|
||||||
<list>
|
|
||||||
<option value="$PROJECT_DIR$/main beta.py" />
|
|
||||||
<option value="$PROJECT_DIR$/28byj-48-driver.py" />
|
|
||||||
<option value="$PROJECT_DIR$/ultrasonic_test.py" />
|
|
||||||
<option value="$PROJECT_DIR$/stream.sh" />
|
|
||||||
<option value="$PROJECT_DIR$/gyro_test.py" />
|
|
||||||
<option value="$PROJECT_DIR$/ultrasonic.py" />
|
|
||||||
<option value="$PROJECT_DIR$/gyro.py" />
|
|
||||||
<option value="$PROJECT_DIR$/install.sh" />
|
|
||||||
<option value="$PROJECT_DIR$/motors.py" />
|
|
||||||
<option value="$PROJECT_DIR$/motor.py" />
|
|
||||||
<option value="$PROJECT_DIR$/servo_2.py" />
|
|
||||||
<option value="$PROJECT_DIR$/thermo.py" />
|
|
||||||
<option value="$PROJECT_DIR$/main.py" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="ProjectFrameBounds" extendedState="6">
|
|
||||||
<option name="x" value="306" />
|
|
||||||
<option name="y" value="-9" />
|
|
||||||
<option name="width" value="1400" />
|
|
||||||
<option name="height" value="1000" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectInspectionProfilesVisibleTreeState">
|
|
||||||
<entry key="Project Default">
|
|
||||||
<profile-state>
|
|
||||||
<expanded-state>
|
|
||||||
<State>
|
|
||||||
<id />
|
|
||||||
</State>
|
|
||||||
</expanded-state>
|
|
||||||
<selected-state>
|
|
||||||
<State>
|
|
||||||
<id>Buildout</id>
|
|
||||||
</State>
|
|
||||||
</selected-state>
|
|
||||||
</profile-state>
|
|
||||||
</entry>
|
|
||||||
</component>
|
|
||||||
<component name="ProjectView">
|
|
||||||
<navigator currentView="ProjectPane" proportions="" version="1">
|
|
||||||
<flattenPackages />
|
|
||||||
<showMembers />
|
|
||||||
<showModules />
|
|
||||||
<showLibraryContents />
|
|
||||||
<hideEmptyPackages />
|
|
||||||
<abbreviatePackageNames />
|
|
||||||
<autoscrollToSource />
|
|
||||||
<autoscrollFromSource />
|
|
||||||
<sortByType />
|
|
||||||
<manualOrder />
|
|
||||||
<foldersAlwaysOnTop value="true" />
|
|
||||||
</navigator>
|
|
||||||
<panes>
|
|
||||||
<pane id="Scratches" />
|
|
||||||
<pane id="Scope" />
|
|
||||||
<pane id="ProjectPane">
|
|
||||||
<subPane>
|
|
||||||
<expand>
|
|
||||||
<path>
|
|
||||||
<item name="SPYDER_CONTROL" type="b2602c69:ProjectViewProjectNode" />
|
|
||||||
<item name="SPYDER_CONTROL" type="462c0819:PsiDirectoryNode" />
|
|
||||||
</path>
|
|
||||||
</expand>
|
|
||||||
<select />
|
|
||||||
</subPane>
|
|
||||||
</pane>
|
|
||||||
</panes>
|
|
||||||
</component>
|
|
||||||
<component name="PropertiesComponent">
|
|
||||||
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
|
|
||||||
<property name="last_opened_file_path" value="/usr/bin/python3.5" />
|
|
||||||
</component>
|
|
||||||
<component name="RunDashboard">
|
|
||||||
<option name="ruleStates">
|
|
||||||
<list>
|
|
||||||
<RuleState>
|
|
||||||
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
|
||||||
</RuleState>
|
|
||||||
<RuleState>
|
|
||||||
<option name="name" value="StatusDashboardGroupingRule" />
|
|
||||||
</RuleState>
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="RunManager" selected="Python.main beta">
|
|
||||||
<configuration default="true" type="PythonConfigurationType" factoryName="Python">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs>
|
|
||||||
<env name="PYTHONUNBUFFERED" value="1" />
|
|
||||||
</envs>
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<module name="für Robotototo" />
|
|
||||||
<option name="SCRIPT_NAME" value="" />
|
|
||||||
<option name="PARAMETERS" value="" />
|
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="Tox" factoryName="Tox">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs />
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<module name="für Robotototo" />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="tests" factoryName="Doctests">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs />
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<module name="für Robotototo" />
|
|
||||||
<option name="SCRIPT_NAME" value="" />
|
|
||||||
<option name="CLASS_NAME" value="" />
|
|
||||||
<option name="METHOD_NAME" value="" />
|
|
||||||
<option name="FOLDER_NAME" value="" />
|
|
||||||
<option name="TEST_TYPE" value="TEST_SCRIPT" />
|
|
||||||
<option name="PATTERN" value="" />
|
|
||||||
<option name="USE_PATTERN" value="false" />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="tests" factoryName="Nosetests">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs />
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<module name="für Robotototo" />
|
|
||||||
<option name="_new_regexPattern" value="""" />
|
|
||||||
<option name="_new_additionalArguments" value="""" />
|
|
||||||
<option name="_new_target" value=""."" />
|
|
||||||
<option name="_new_targetType" value=""PATH"" />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration name="main beta" type="PythonConfigurationType" factoryName="Python" temporary="true">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs>
|
|
||||||
<env name="PYTHONUNBUFFERED" value="1" />
|
|
||||||
</envs>
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
|
||||||
<option name="IS_MODULE_SDK" value="true" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<module name="für Robotototo" />
|
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/main beta.py" />
|
|
||||||
<option name="PARAMETERS" value="" />
|
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
|
||||||
</configuration>
|
|
||||||
<configuration name="motor" type="PythonConfigurationType" factoryName="Python" temporary="true">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs>
|
|
||||||
<env name="PYTHONUNBUFFERED" value="1" />
|
|
||||||
</envs>
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
|
||||||
<option name="IS_MODULE_SDK" value="true" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<module name="für Robotototo" />
|
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/motor.py" />
|
|
||||||
<option name="PARAMETERS" value="" />
|
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
|
||||||
</configuration>
|
|
||||||
<list size="2">
|
|
||||||
<item index="0" class="java.lang.String" itemvalue="Python.main beta" />
|
|
||||||
<item index="1" class="java.lang.String" itemvalue="Python.motor" />
|
|
||||||
</list>
|
|
||||||
<recent_temporary>
|
|
||||||
<list size="2">
|
|
||||||
<item index="0" class="java.lang.String" itemvalue="Python.main beta" />
|
|
||||||
<item index="1" class="java.lang.String" itemvalue="Python.motor" />
|
|
||||||
</list>
|
|
||||||
</recent_temporary>
|
|
||||||
</component>
|
|
||||||
<component name="ShelveChangesManager" show_recycled="false">
|
|
||||||
<option name="remove_strategy" value="false" />
|
|
||||||
</component>
|
|
||||||
<component name="TaskManager">
|
|
||||||
<task active="true" id="Default" summary="Default task">
|
|
||||||
<changelist id="49388e57-2b9e-468a-b880-1d7fb243112d" name="Default" comment="" />
|
|
||||||
<created>1501667906814</created>
|
|
||||||
<option name="number" value="Default" />
|
|
||||||
<option name="presentableId" value="Default" />
|
|
||||||
<updated>1501667906814</updated>
|
|
||||||
</task>
|
|
||||||
<servers />
|
|
||||||
</component>
|
|
||||||
<component name="TodoView">
|
|
||||||
<todo-panel id="selected-file">
|
|
||||||
<is-autoscroll-to-source value="true" />
|
|
||||||
</todo-panel>
|
|
||||||
<todo-panel id="all">
|
|
||||||
<are-packages-shown value="true" />
|
|
||||||
<is-autoscroll-to-source value="true" />
|
|
||||||
</todo-panel>
|
|
||||||
</component>
|
|
||||||
<component name="ToolWindowManager">
|
|
||||||
<frame x="0" y="34" width="1366" height="734" extended-state="6" />
|
|
||||||
<layout>
|
|
||||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18008785" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
|
||||||
<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="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32921347" sideWeight="0.5" order="7" 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="false" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Python Console" 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="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.33" sideWeight="0.5" order="2" 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.25" sideWeight="0.5" order="1" 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="9" 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="2" 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.39979655" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Data View" 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="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="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="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" 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="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.33" 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" />
|
|
||||||
</layout>
|
|
||||||
</component>
|
|
||||||
<component name="VcsContentAnnotationSettings">
|
|
||||||
<option name="myLimit" value="2678400000" />
|
|
||||||
</component>
|
|
||||||
<component name="XDebuggerManager">
|
|
||||||
<breakpoint-manager>
|
|
||||||
<default-breakpoints>
|
|
||||||
<breakpoint type="python-exception">
|
|
||||||
<properties notifyOnTerminate="true" exception="BaseException">
|
|
||||||
<option name="notifyOnTerminate" value="true" />
|
|
||||||
</properties>
|
|
||||||
</breakpoint>
|
|
||||||
</default-breakpoints>
|
|
||||||
<option name="time" value="3" />
|
|
||||||
</breakpoint-manager>
|
|
||||||
<watches-manager />
|
|
||||||
</component>
|
|
||||||
<component name="editorHistoryManager">
|
|
||||||
<entry file="file://$PROJECT_DIR$/ultrasonic.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="493">
|
|
||||||
<caret line="30" column="13" lean-forward="false" selection-start-line="30" selection-start-column="13" selection-end-line="30" selection-end-column="13" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#23#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/ultrasonic_test.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="85">
|
|
||||||
<caret line="5" column="14" lean-forward="true" selection-start-line="5" selection-start-column="14" selection-end-line="5" selection-end-column="14" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/gyro.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="884">
|
|
||||||
<caret line="53" column="129" lean-forward="false" selection-start-line="53" selection-start-column="129" selection-end-line="53" selection-end-column="129" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/install.sh">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/motors.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="663">
|
|
||||||
<caret line="39" column="25" lean-forward="false" selection-start-line="39" selection-start-column="25" selection-end-line="39" selection-end-column="25" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#22#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/main.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="1462">
|
|
||||||
<caret line="86" column="12" lean-forward="false" selection-start-line="86" selection-start-column="12" selection-end-line="86" selection-end-column="12" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#41#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/stream.sh">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="44" lean-forward="false" selection-start-line="0" selection-start-column="44" selection-end-line="0" selection-end-column="44" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/gyro_test.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="34">
|
|
||||||
<caret line="3" column="31" lean-forward="false" selection-start-line="3" selection-start-column="31" selection-end-line="3" selection-end-column="31" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#11#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/ultrasonic.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="493">
|
|
||||||
<caret line="30" column="13" lean-forward="false" selection-start-line="30" selection-start-column="13" selection-end-line="30" selection-end-column="13" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#23#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/ultrasonic_test.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="85">
|
|
||||||
<caret line="5" column="14" lean-forward="true" selection-start-line="5" selection-start-column="14" selection-end-line="5" selection-end-column="14" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/gyro.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="884">
|
|
||||||
<caret line="53" column="129" lean-forward="false" selection-start-line="53" selection-start-column="129" selection-end-line="53" selection-end-column="129" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/install.sh">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="17">
|
|
||||||
<caret line="1" column="29" lean-forward="false" selection-start-line="1" selection-start-column="29" selection-end-line="1" selection-end-column="29" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/motors.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="663">
|
|
||||||
<caret line="39" column="25" lean-forward="false" selection-start-line="39" selection-start-column="25" selection-end-line="39" selection-end-column="25" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#22#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/main.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="1292">
|
|
||||||
<caret line="76" column="73" lean-forward="false" selection-start-line="76" selection-start-column="73" selection-end-line="76" selection-end-column="73" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#41#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/stream.sh">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="44" lean-forward="false" selection-start-line="0" selection-start-column="44" selection-end-line="0" selection-end-column="44" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/gyro_test.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="34">
|
|
||||||
<caret line="3" column="31" lean-forward="false" selection-start-line="3" selection-start-column="31" selection-end-line="3" selection-end-column="31" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#11#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/ultrasonic_test.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="17">
|
|
||||||
<caret line="1" column="0" lean-forward="false" selection-start-line="1" selection-start-column="0" selection-end-line="2" selection-end-column="17" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/gyro.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="170">
|
|
||||||
<caret line="11" column="0" lean-forward="false" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/ultrasonic.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="357">
|
|
||||||
<caret line="22" column="68" lean-forward="false" selection-start-line="22" selection-start-column="68" selection-end-line="22" selection-end-column="68" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#23#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/install.sh">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="17">
|
|
||||||
<caret line="1" column="29" lean-forward="false" selection-start-line="1" selection-start-column="29" selection-end-line="1" selection-end-column="29" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/motors.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="663">
|
|
||||||
<caret line="39" column="25" lean-forward="false" selection-start-line="39" selection-start-column="25" selection-end-line="39" selection-end-column="25" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#22#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/main.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="952">
|
|
||||||
<caret line="56" column="41" lean-forward="true" selection-start-line="56" selection-start-column="41" selection-end-line="56" selection-end-column="41" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#41#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/ultrasonic.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="561">
|
|
||||||
<caret line="34" column="20" lean-forward="false" selection-start-line="34" selection-start-column="20" selection-end-line="34" selection-end-column="20" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#23#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/gyro.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="221">
|
|
||||||
<caret line="14" column="0" lean-forward="false" selection-start-line="14" selection-start-column="0" selection-end-line="14" selection-end-column="0" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/stream.sh">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="36" lean-forward="false" selection-start-line="0" selection-start-column="36" selection-end-line="0" selection-end-column="36" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/install.sh">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="17">
|
|
||||||
<caret line="1" column="29" lean-forward="false" selection-start-line="1" selection-start-column="29" selection-end-line="1" selection-end-column="29" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/main.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="1632">
|
|
||||||
<caret line="96" column="34" lean-forward="false" selection-start-line="96" selection-start-column="34" selection-end-line="96" selection-end-column="34" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#41#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/motors.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="663">
|
|
||||||
<caret line="39" column="25" lean-forward="true" selection-start-line="39" selection-start-column="25" selection-end-line="39" selection-end-column="25" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#22#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/ultrasonic.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="561">
|
|
||||||
<caret line="34" column="20" lean-forward="true" selection-start-line="34" selection-start-column="20" selection-end-line="34" selection-end-column="20" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#23#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/gyro.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="221">
|
|
||||||
<caret line="14" column="0" lean-forward="false" selection-start-line="14" selection-start-column="0" selection-end-line="14" selection-end-column="0" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/install.sh">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="17">
|
|
||||||
<caret line="1" column="29" lean-forward="false" selection-start-line="1" selection-start-column="29" selection-end-line="1" selection-end-column="29" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/ultrasonic.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="476">
|
|
||||||
<caret line="29" column="0" lean-forward="true" selection-start-line="29" selection-start-column="0" selection-end-line="29" selection-end-column="0" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#23#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/motors.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="1700">
|
|
||||||
<caret line="100" column="24" lean-forward="false" selection-start-line="100" selection-start-column="24" selection-end-line="100" selection-end-column="24" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#22#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/gyro.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="221">
|
|
||||||
<caret line="14" column="0" lean-forward="true" selection-start-line="14" selection-start-column="0" selection-end-line="14" selection-end-column="0" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/install.sh">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="34">
|
|
||||||
<caret line="2" column="26" lean-forward="false" selection-start-line="2" selection-start-column="26" selection-end-line="2" selection-end-column="26" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/motor.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/main beta.py" />
|
|
||||||
<entry file="file://$PROJECT_DIR$/install.sh">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/28byj-48-driver.py" />
|
|
||||||
<entry file="file://$PROJECT_DIR$/main beta.py" />
|
|
||||||
<entry file="file://$PROJECT_DIR$/gyro.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="153">
|
|
||||||
<caret line="10" column="45" lean-forward="false" selection-start-line="10" selection-start-column="45" selection-end-line="10" selection-end-column="45" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/motors.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="1734">
|
|
||||||
<caret line="105" column="31" lean-forward="false" selection-start-line="105" selection-start-column="16" selection-end-line="105" selection-end-column="31" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#22#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/install.sh">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="136">
|
|
||||||
<caret line="8" column="20" lean-forward="false" selection-start-line="8" selection-start-column="20" selection-end-line="8" selection-end-column="20" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/gyro_test.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="34">
|
|
||||||
<caret line="3" column="31" lean-forward="false" selection-start-line="3" selection-start-column="31" selection-end-line="3" selection-end-column="31" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#11#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/ultrasonic_test.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="85">
|
|
||||||
<caret line="5" column="14" lean-forward="false" selection-start-line="5" selection-start-column="14" selection-end-line="5" selection-end-column="14" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/ultrasonic.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="493">
|
|
||||||
<caret line="30" column="13" lean-forward="false" selection-start-line="30" selection-start-column="13" selection-end-line="30" selection-end-column="13" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#23#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/motor.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="1921">
|
|
||||||
<caret line="114" column="0" lean-forward="false" selection-start-line="114" selection-start-column="0" selection-end-line="114" selection-end-column="0" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#23#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/stream.sh">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="44" lean-forward="false" selection-start-line="0" selection-start-column="44" selection-end-line="0" selection-end-column="44" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/servo_2.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="102">
|
|
||||||
<caret line="7" column="22" lean-forward="false" selection-start-line="7" selection-start-column="22" selection-end-line="7" selection-end-column="22" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#35#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/thermo.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="68">
|
|
||||||
<caret line="5" column="58" lean-forward="false" selection-start-line="5" selection-start-column="58" selection-end-line="5" selection-end-column="58" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#10#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/main.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="340">
|
|
||||||
<caret line="20" column="16" lean-forward="false" selection-start-line="20" selection-start-column="16" selection-end-line="20" selection-end-column="16" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#41#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,99 @@
|
|||||||
|
import pygame, os
|
||||||
|
|
||||||
|
class Joystick():
|
||||||
|
|
||||||
|
def __init__(self, navigator, light, configuration, camera):
|
||||||
|
#joystick
|
||||||
|
pygame.joystick.init()
|
||||||
|
joystick = pygame.joystick.Joystick(0)
|
||||||
|
joystick.init()
|
||||||
|
#sound
|
||||||
|
pygame.mixer.init()
|
||||||
|
sound = pygame.mixer.Sound('./sounds/gasgasgas.wav')
|
||||||
|
sound.set_volume(0.3)
|
||||||
|
self.camera = camera
|
||||||
|
self.sound = sound
|
||||||
|
self.joystick = joystick
|
||||||
|
self.navigator = navigator
|
||||||
|
self.light = light
|
||||||
|
self.configuration = configuration
|
||||||
|
self.pressed = []
|
||||||
|
self.splaying = False
|
||||||
|
|
||||||
|
def handle(self):
|
||||||
|
c = self.configuration
|
||||||
|
nav = self.navigator
|
||||||
|
dict = {}
|
||||||
|
#axes
|
||||||
|
for i in range(self.joystick.get_numaxes()):
|
||||||
|
axis = self.joystick.get_axis(i)
|
||||||
|
dict['Axis {}'.format(i)]=axis
|
||||||
|
|
||||||
|
if i==c['GAS'] and axis>0.1:
|
||||||
|
nav.forward()
|
||||||
|
elif i==c['GAS'] and axis<0.1:
|
||||||
|
nav.stop()
|
||||||
|
#buttons
|
||||||
|
for i in range(self.joystick.get_numbuttons()):
|
||||||
|
button = self.joystick.get_button(i)
|
||||||
|
dict['Button {}'.format(i)] = button
|
||||||
|
|
||||||
|
if i==c['LIGHT'] and button==1 and button not in self.pressed:
|
||||||
|
self.light.switch()
|
||||||
|
self.pressed.append(i)
|
||||||
|
elif i==c['LIGHT'] and button==0 and button in self.pressed:
|
||||||
|
self.pressed.remove(i)
|
||||||
|
|
||||||
|
elif i==c['MUSIC'] and button==1 and button not in self.pressed:
|
||||||
|
if self.splaying:
|
||||||
|
self.sound.stop()
|
||||||
|
self.splaying = False
|
||||||
|
else:
|
||||||
|
self.sound.play()
|
||||||
|
self.splaying = True
|
||||||
|
self.pressed.append(i)
|
||||||
|
elif i==c['MUSIC'] and button==0 and button in self.pressed:
|
||||||
|
self.pressed.remove(i)
|
||||||
|
|
||||||
|
elif i==c['VOLIN'] and button==1 and button not in self.pressed:
|
||||||
|
self.sound.set_volume(self.sound.get_volume()+0.1)
|
||||||
|
self.pressed.append(i)
|
||||||
|
elif i==c['VOLIN'] and button==0 and button in self.pressed:
|
||||||
|
self.sound.set_volume(self.sound.get_volume() - 0.1)
|
||||||
|
self.pressed.remove(i)
|
||||||
|
|
||||||
|
elif i==c['VOLDE'] and button==1 and button not in self.pressed:
|
||||||
|
self.pressed.append(i)
|
||||||
|
elif i==c['VOLDE'] and button==0 and button in self.pressed:
|
||||||
|
self.pressed.remove(i)
|
||||||
|
|
||||||
|
elif i==c['REC'] and button==1 and button not in self.pressed:
|
||||||
|
self._save_camimg()
|
||||||
|
self.pressed.append(i)
|
||||||
|
elif i==c['REC'] and button==0 and button in self.pressed:
|
||||||
|
self.pressed.remove(i)
|
||||||
|
|
||||||
|
#hats
|
||||||
|
for i in range(self.joystick.get_numhats()):
|
||||||
|
hat = self.joystick.get_hat(i)
|
||||||
|
dict['Hat {}'.format(i)] = hat
|
||||||
|
|
||||||
|
if hat==(-1,0):
|
||||||
|
nav.left()
|
||||||
|
elif hat==(1,0):
|
||||||
|
nav.right()
|
||||||
|
else:
|
||||||
|
nav.straight()
|
||||||
|
|
||||||
|
dict['Volume'] = self.sound.get_volume()
|
||||||
|
return dict
|
||||||
|
|
||||||
|
|
||||||
|
def _save_camimg(self):
|
||||||
|
img = self.camera.image
|
||||||
|
if os.path.isfile('image.jpg'):
|
||||||
|
count=0
|
||||||
|
while os.path.isfile('./images/img{}.jpg'.format(count)):
|
||||||
|
count+=1
|
||||||
|
os.rename('image.jpg', 'images/img{}.jpg'.format(count))
|
||||||
|
pygame.image.save(img, 'image.jpg')
|
@ -0,0 +1,81 @@
|
|||||||
|
import pygame, pygame.camera
|
||||||
|
from pygame import *
|
||||||
|
|
||||||
|
def render_text_line(image, color, font, text, pos = (0,0)):
|
||||||
|
render_text = font.render(text, 1, color)
|
||||||
|
image.blit(render_text, pos)
|
||||||
|
|
||||||
|
class Screen:
|
||||||
|
"""The Screen for the Terminal"""
|
||||||
|
|
||||||
|
def __init__(self, size = (100,100), title = "Screen"):
|
||||||
|
pygame.display.init()
|
||||||
|
self.size = size
|
||||||
|
self.screen = pygame.display.set_mode(self.size)
|
||||||
|
pygame.display.set_caption(title)
|
||||||
|
|
||||||
|
|
||||||
|
def refresh(self, rectangles=None):
|
||||||
|
pygame.display.update(rectangles)
|
||||||
|
|
||||||
|
|
||||||
|
def toggle_fullscreen(self):
|
||||||
|
if self.fullscreen:
|
||||||
|
pygame.display.set_mode(self.size)
|
||||||
|
self.fullscreen = False
|
||||||
|
else:
|
||||||
|
displayinfo = pygame.display.Info()
|
||||||
|
fullsize = (displayinfo.current_w, displayinfo.current_h)
|
||||||
|
pygame.display.set_mode(fullsize, FULLSCREEN | DOUBLEBUF)
|
||||||
|
self.fullscreen = True
|
||||||
|
|
||||||
|
|
||||||
|
class List(pygame.sprite.Sprite):
|
||||||
|
"""A List that shows the values of the terminal"""
|
||||||
|
|
||||||
|
def __init__(self, position, size):
|
||||||
|
pygame.sprite.Sprite.__init__(self)
|
||||||
|
pygame.font.init()
|
||||||
|
self.size = size
|
||||||
|
self.image = pygame.Surface(self.size)
|
||||||
|
self.image.fill((0,0,0))
|
||||||
|
self.rect = self.image.get_rect()
|
||||||
|
self.rect.topleft = position
|
||||||
|
self.font = pygame.font.SysFont('Arial',25)
|
||||||
|
self.dict = {}
|
||||||
|
self.updated = True
|
||||||
|
self.txtsize = self.font.size('__||__')
|
||||||
|
|
||||||
|
|
||||||
|
def set_dict(self, dict):
|
||||||
|
self.dict = dict
|
||||||
|
self.updated = True
|
||||||
|
|
||||||
|
def update(self, *args):
|
||||||
|
if self.updated:
|
||||||
|
height = 0
|
||||||
|
|
||||||
|
for key in self.dict.keys():
|
||||||
|
line = '{}: {}'.format(key, self.dict[key])
|
||||||
|
render_text_line(self.image, (255, 255, 255), self.font, line, (0,height))
|
||||||
|
height+=self.txtsize[1]
|
||||||
|
|
||||||
|
self.updated = False
|
||||||
|
|
||||||
|
class PiCamera(pygame.sprite.Sprite):
|
||||||
|
"""The Picamera as pygame cam"""
|
||||||
|
|
||||||
|
def __init__(self, position, size):
|
||||||
|
pygame.sprite.Sprite.__init__(self)
|
||||||
|
pygame.camera.init()
|
||||||
|
cam_list = pygame.camera.list_cameras()
|
||||||
|
camera = pygame.camera.Camera(cam_list[0], size)
|
||||||
|
self.camera = camera
|
||||||
|
self.size = size
|
||||||
|
self.image = pygame.Surface(self.size)
|
||||||
|
self.image.fill((0, 0, 0))
|
||||||
|
self.rect = self.image.get_rect()
|
||||||
|
self.rect.topleft = position
|
||||||
|
|
||||||
|
def update(self, *args):
|
||||||
|
self.camera.get_image(self.image)
|
@ -1,4 +1,4 @@
|
|||||||
import gyro
|
from lib import gyro
|
||||||
import time
|
import time
|
||||||
while True:
|
while True:
|
||||||
print(gyro.getAllOut()['rot'])
|
print(gyro.getAllOut()['rot'])
|
@ -0,0 +1,93 @@
|
|||||||
|
from subprocess import call, check_output
|
||||||
|
from lib import ultrasonic
|
||||||
|
import RPi.GPIO as GPIO
|
||||||
|
|
||||||
|
class Navigator():
|
||||||
|
"""Forward Motor with relais, Steering with servo"""
|
||||||
|
|
||||||
|
def __init__(self, mrelaispin):
|
||||||
|
self.mrelpin = mrelaispin
|
||||||
|
self.steer = None
|
||||||
|
GPIO.setup(self.mrelpin, GPIO.OUT)
|
||||||
|
self.stop()
|
||||||
|
|
||||||
|
|
||||||
|
def left(self):
|
||||||
|
if self.steer != 'left':
|
||||||
|
call(['python', './lib/servolib.py', 'left'])
|
||||||
|
self.steer = 'left'
|
||||||
|
|
||||||
|
|
||||||
|
def right(self):
|
||||||
|
if self.steer != 'right':
|
||||||
|
call(['python', './lib/servolib.py', 'right'])
|
||||||
|
self.steer = 'right'
|
||||||
|
|
||||||
|
|
||||||
|
def straight(self):
|
||||||
|
if self.steer:
|
||||||
|
call(['python', './lib/servolib.py'])
|
||||||
|
self.steer = None
|
||||||
|
|
||||||
|
|
||||||
|
def forward(self):
|
||||||
|
GPIO.output(self.mrelpin, False)
|
||||||
|
|
||||||
|
|
||||||
|
def stop(self):
|
||||||
|
GPIO.output(self.mrelpin, True)
|
||||||
|
|
||||||
|
|
||||||
|
class Light:
|
||||||
|
"""Light switched with a relais"""
|
||||||
|
|
||||||
|
def __init__(self, lightpin):
|
||||||
|
self.pin = lightpin
|
||||||
|
GPIO.setup(self.pin, GPIO.OUT)
|
||||||
|
GPIO.output(self.pin, True)
|
||||||
|
self.shine = False
|
||||||
|
|
||||||
|
|
||||||
|
def switch(self):
|
||||||
|
GPIO.output(self.pin, not self.shine)
|
||||||
|
self.shine = not self.shine
|
||||||
|
|
||||||
|
|
||||||
|
def switch_on(self):
|
||||||
|
GPIO.output(self.pin, False)
|
||||||
|
|
||||||
|
|
||||||
|
def switch_of(self):
|
||||||
|
GPIO.output(self.pin, True)
|
||||||
|
|
||||||
|
|
||||||
|
class Ultrasonic:
|
||||||
|
"""A ultrasonic sensor"""
|
||||||
|
|
||||||
|
def __init__(self, trigger, echo):
|
||||||
|
self.sensor =ultrasonic.Sensor()
|
||||||
|
self.sensor.init(trigger, echo)
|
||||||
|
|
||||||
|
|
||||||
|
def get_distance(self):
|
||||||
|
distance = self.sensor.echo()
|
||||||
|
return distance
|
||||||
|
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
self.sensor.clean()
|
||||||
|
|
||||||
|
|
||||||
|
class Temperature:
|
||||||
|
"""A temperature sensor"""
|
||||||
|
|
||||||
|
def get_Temperature(self):
|
||||||
|
outp = check_output(['python','-u','./lib/thermolib.py']).decode('ISO-8859-1')
|
||||||
|
temp, hum = outp.split('|')
|
||||||
|
return temp
|
||||||
|
|
||||||
|
|
||||||
|
def get_Humidity(self):
|
||||||
|
outp = check_output(['python','-u','./lib/thermolib.py']).decode('ISO-8859-1')
|
||||||
|
temp, hum = outp.split('|')
|
||||||
|
return hum
|
@ -0,0 +1,8 @@
|
|||||||
|
import Adafruit_DHT
|
||||||
|
|
||||||
|
def main():
|
||||||
|
humidity, temperature = Adafruit_DHT.read_retry(11, 14)
|
||||||
|
print '{}|{}'.format(temperature, humidity)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
@ -0,0 +1,7 @@
|
|||||||
|
from lib import ultrasonic
|
||||||
|
|
||||||
|
sensor= ultrasonic.Sensor()
|
||||||
|
sensor.init(11,7)
|
||||||
|
print('Beginn der Messung')
|
||||||
|
print(sensor.echo())
|
||||||
|
sensor.clean()
|
@ -1,364 +1,46 @@
|
|||||||
import pygame, picamera, ultrasonic#,gyro
|
import pygame, time
|
||||||
from datetime import datetime
|
from lib import graphiclib, hardwarelib, controllib
|
||||||
from subprocess import call
|
|
||||||
import RPi.GPIO as GPIO
|
configuration = {
|
||||||
|
'GAS':5,
|
||||||
|
'STOP':2,
|
||||||
|
'MUSIC':1,
|
||||||
# Define some colors
|
'LIGHT':0,
|
||||||
BLACK = ( 0, 0, 0)
|
'VOLIN':5,
|
||||||
WHITE = ( 255, 255, 255)
|
'VOLDE':4,
|
||||||
# --ultrasonic--
|
'REC':3
|
||||||
sensor=ultrasonic.Sensor()
|
}
|
||||||
sensor.init(11,7)
|
|
||||||
# -- Nightmode
|
def main():
|
||||||
# WHITE, BLACK=BLACK,WHITE
|
navigator = hardwarelib.Navigator(16)
|
||||||
# Pins BCM
|
light = hardwarelib.Light(15)
|
||||||
motor = 16
|
ultrasonic = hardwarelib.Ultrasonic(11,7)
|
||||||
lightpin=15
|
temperature = hardwarelib.Temperature()
|
||||||
#
|
camera = graphiclib.PiCamera((500, 0), (500, 1000))
|
||||||
# --config--
|
jstick = controllib.Joystick(navigator, light, configuration, camera)
|
||||||
use_camera=False
|
|
||||||
use_gyro_preview=False
|
#pygame stuff
|
||||||
#--
|
screen = graphiclib.Screen(size=(1000,1000))
|
||||||
forpress = False
|
all_sprites = pygame.sprite.RenderUpdates()
|
||||||
light = False
|
list = graphiclib.List((0,0),(500,1000))
|
||||||
lpress = False
|
all_sprites.add(list)
|
||||||
play = False
|
all_sprites.add(camera)
|
||||||
ppress = False
|
|
||||||
voluppress = False
|
|
||||||
voldopress = False
|
|
||||||
recpress=False
|
|
||||||
recording=False
|
|
||||||
left=False
|
|
||||||
right=False
|
|
||||||
lastContact=datetime.now()
|
|
||||||
if use_camera:
|
|
||||||
cam = picamera.PiCamera()
|
|
||||||
|
|
||||||
top_view = pygame.image.load('top_view.png')
|
|
||||||
top_view= pygame.transform.scale(top_view, (192, 108))
|
|
||||||
|
|
||||||
# Axis
|
|
||||||
GAS = 5
|
|
||||||
STOP = 2
|
|
||||||
|
|
||||||
# Buttons
|
|
||||||
MUSIC = 1
|
|
||||||
LIGHT = 0
|
|
||||||
VOLUP = 5
|
|
||||||
VOLDO = 4
|
|
||||||
RECSTART = 3
|
|
||||||
|
|
||||||
# setup the relais
|
|
||||||
GPIO.setup(motor,GPIO.OUT)
|
|
||||||
GPIO.setup(lightpin,GPIO.OUT)
|
|
||||||
GPIO.output(motor,True)
|
|
||||||
GPIO.output(lightpin, True)
|
|
||||||
# ____________________________
|
|
||||||
# -- driving functions
|
|
||||||
def drive_forw():
|
|
||||||
GPIO.output(motor,False)
|
|
||||||
return
|
|
||||||
|
|
||||||
def drive_backw():
|
|
||||||
print(drive_backw)
|
|
||||||
return
|
|
||||||
|
|
||||||
def reset_dire():
|
|
||||||
GPIO.output(motor,True)
|
|
||||||
return
|
|
||||||
|
|
||||||
def drive_left():
|
|
||||||
if not left:
|
|
||||||
call(['python', 'servo_2.py','left'])
|
|
||||||
return
|
|
||||||
|
|
||||||
def drive_right():
|
|
||||||
if not right:
|
|
||||||
call(['python', 'servo_2.py','right'])
|
|
||||||
return
|
|
||||||
|
|
||||||
def reset_turn():
|
|
||||||
if left or right:
|
|
||||||
call(['python','servo_2.py'])
|
|
||||||
return
|
|
||||||
# ____________________________
|
|
||||||
# -- special functions
|
|
||||||
def turn_light(shine):
|
|
||||||
if shine:
|
|
||||||
GPIO.output(lightpin, False)
|
|
||||||
else:
|
|
||||||
GPIO.output(lightpin, True)
|
|
||||||
return
|
|
||||||
|
|
||||||
def turn_rec(*record):
|
|
||||||
#if record:
|
|
||||||
#cam.start_recording('record.h264')
|
|
||||||
#return
|
|
||||||
#else:
|
|
||||||
#cam.stop_recording()
|
|
||||||
#return
|
|
||||||
if use_camera:
|
|
||||||
try:
|
|
||||||
cam.capture('image.jpg', resize=(192 * 2, 108 * 2))
|
|
||||||
cam.capture("./Images/image{}.jpg".format(str(datetime.now()).replace(':','_')))
|
|
||||||
except Exception as error:
|
|
||||||
print(error)
|
|
||||||
|
|
||||||
def imgRefresh():
|
|
||||||
#turn_rec(True)
|
|
||||||
try:
|
|
||||||
image = pygame.image.load('image.jpg')
|
|
||||||
image = pygame.transform.scale(image, (192*2, 108*2))
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
screen.blit(image, (500, 10))
|
|
||||||
#gyro_output = gyro.getAllOut()
|
|
||||||
#rotation = gyro_output['rot']
|
|
||||||
if use_gyro_preview:
|
|
||||||
top_view = pygame.image.load('top_view.png')
|
|
||||||
# The scaling of the top_view Spider
|
|
||||||
scal_x = abs(int(192 * ((abs(rotation[0]) / 90) - 1)))
|
|
||||||
scal_y = abs(int(108 * ((abs(rotation[1]) / 90) - 1)) - 1)
|
|
||||||
top_view = pygame.transform.scale(top_view, (scal_x, scal_y))
|
|
||||||
screen.blit(top_view, (550 - (scal_x / 2), 300 - (scal_y / 2)))
|
|
||||||
|
|
||||||
def printDriveData():
|
|
||||||
textPrint.print(screen,"")
|
|
||||||
textPrint.print(screen,"Sound Information")
|
|
||||||
textPrint.print(screen, " Sound: {}".format(play))
|
|
||||||
textPrint.print(screen, " Volume: {}".format(sound.get_volume()))
|
|
||||||
textPrint.print(screen, "Light: {}".format(light))
|
|
||||||
textPrint.print(screen, "Last Controller Input: {}".format((datetime.now()-lastContact).seconds))
|
|
||||||
#gyro_output=gyro.getAllOut()
|
|
||||||
#rotation=gyro_output['rot']
|
|
||||||
#textPrint.print(screen, "Rotation: X:{}; Y:{}".format(rotation[0],rotation[1]))
|
|
||||||
#acceleration = gyro_output['acc_sca']
|
|
||||||
#textPrint.print(screen, "Acceleration: X:{}; Y:{}; Z:{}".format(acceleration[0], acceleration[1],acceleration[2]))
|
|
||||||
distance=sensor.echo()
|
|
||||||
textPrint.print(screen, "Distance: {} cm".format(distance))
|
|
||||||
#if distance<40:
|
|
||||||
# turn_rec()
|
|
||||||
|
|
||||||
def doSubroutine():
|
|
||||||
if abs((datetime.now()-lastContact).seconds)==30:
|
|
||||||
print('Contact Lost')
|
|
||||||
imgRefresh()
|
|
||||||
|
|
||||||
# ____________________________
|
|
||||||
class TextPrint:
|
|
||||||
def __init__(self):
|
|
||||||
self.reset()
|
|
||||||
self.font = pygame.font.Font(None, 20)
|
|
||||||
|
|
||||||
def print(self, screen, textString):
|
|
||||||
textBitmap = self.font.render(textString, True, BLACK)
|
|
||||||
screen.blit(textBitmap, [self.x, self.y])
|
|
||||||
self.y += self.line_height
|
|
||||||
|
|
||||||
def reset(self):
|
|
||||||
self.x = 10
|
|
||||||
self.y = 10
|
|
||||||
self.line_height = 15
|
|
||||||
|
|
||||||
def indent(self):
|
|
||||||
self.x += 10
|
|
||||||
|
|
||||||
def unindent(self):
|
|
||||||
self.x -= 10
|
|
||||||
|
|
||||||
pygame.init()
|
|
||||||
|
|
||||||
# ________________________
|
|
||||||
# -- music playback
|
|
||||||
pygame.mixer.init()
|
|
||||||
sound=pygame.mixer.Sound('./gasgasgas.wav')
|
|
||||||
sound.set_volume(0.3)
|
|
||||||
# ________________________
|
|
||||||
|
|
||||||
# Set the width and height of the screen [width,height]
|
|
||||||
size = [1000, 700]
|
|
||||||
screen = pygame.display.set_mode(size)
|
|
||||||
|
|
||||||
pygame.display.set_caption("SPYDER STEUERZENTRALE")
|
|
||||||
|
|
||||||
# Loop until the user clicks the close button.
|
|
||||||
done = False
|
|
||||||
|
|
||||||
# Used to manage how fast the screen updates
|
|
||||||
clock = pygame.time.Clock()
|
clock = pygame.time.Clock()
|
||||||
|
running = True
|
||||||
|
|
||||||
|
while running:
|
||||||
|
clock.tick(25)
|
||||||
|
for event in pygame.event.get():
|
||||||
|
if event.type == pygame.QUIT:
|
||||||
|
running = False
|
||||||
|
|
||||||
|
dict = jstick.handle()
|
||||||
|
list.set_dict(dict)
|
||||||
|
all_sprites.update()
|
||||||
|
update_rects = all_sprites.draw(screen.screen)
|
||||||
|
screen.refresh(rectangles= update_rects)
|
||||||
|
pygame.quit()
|
||||||
|
|
||||||
# Initialize the joysticks
|
|
||||||
pygame.joystick.init()
|
|
||||||
|
|
||||||
# Get ready to print
|
|
||||||
textPrint = TextPrint()
|
|
||||||
turn_rec(True)
|
|
||||||
image=pygame.image.load('image.jpg')
|
|
||||||
image=pygame.transform.scale(image,(192*2,108*2))
|
|
||||||
count=0
|
|
||||||
|
|
||||||
# -------- Main Program Loop -----------
|
|
||||||
while done==False:
|
|
||||||
# EVENT PROCESSING STEP
|
|
||||||
for event in pygame.event.get(): # User did something
|
|
||||||
if event.type == pygame.QUIT: # If user clicked close
|
|
||||||
done=True # Flag that we are done so we exit this loop
|
|
||||||
|
|
||||||
# Possible joystick actions: JOYAXISMOTION JOYBALLMOTION JOYBUTTONDOWN JOYBUTTONUP JOYHATMOTIO
|
|
||||||
|
|
||||||
|
|
||||||
# DRAWING STEP
|
|
||||||
# First, clear the screen to white. Don't put other drawing commands
|
|
||||||
# above this, or they will be erased with this command.
|
|
||||||
screen.fill(WHITE)
|
|
||||||
textPrint.reset()
|
|
||||||
|
|
||||||
# Get count of joysticks
|
|
||||||
joystick_count = pygame.joystick.get_count()
|
|
||||||
|
|
||||||
textPrint.print(screen, "Number of joysticks: {}".format(joystick_count) )
|
|
||||||
textPrint.indent()
|
|
||||||
|
|
||||||
# For each joystick:
|
|
||||||
for i in range(joystick_count):
|
|
||||||
joystick = pygame.joystick.Joystick(i)
|
|
||||||
joystick.init()
|
|
||||||
|
|
||||||
textPrint.print(screen, "Joystick {}".format(i) )
|
|
||||||
textPrint.indent()
|
|
||||||
|
|
||||||
# Get the name from the OS for the controller/joystick
|
|
||||||
#name = joystick.get_name()
|
|
||||||
#textPrint.print(screen, "Joystick name: {}".format(name) )
|
|
||||||
|
|
||||||
# Usually axis run in pairs, up/down for one, and left/right for
|
|
||||||
# the other.
|
|
||||||
axes = joystick.get_numaxes()
|
|
||||||
textPrint.print(screen, "Number of axes: {}".format(axes) )
|
|
||||||
textPrint.indent()
|
|
||||||
|
|
||||||
for i in range( axes ):
|
|
||||||
axis = joystick.get_axis( i )
|
|
||||||
textPrint.print(screen, "Axis {} value: {:>6.3f}".format(i, axis) )
|
|
||||||
if i==STOP and axis>0.1:
|
|
||||||
print('STOP')
|
|
||||||
drive_backw()
|
|
||||||
lastContact=datetime.now()
|
|
||||||
elif i==GAS and axis>0.1:
|
|
||||||
print('GAS')
|
|
||||||
if not forpress:
|
|
||||||
drive_forw()
|
|
||||||
forpress=True
|
|
||||||
lastContact=datetime.now()
|
|
||||||
elif i==GAS and axis<0.1:
|
|
||||||
if forpress:
|
|
||||||
reset_dire()
|
|
||||||
print('RESETDRIVE')
|
|
||||||
forpress=False
|
|
||||||
|
|
||||||
textPrint.unindent()
|
|
||||||
|
|
||||||
buttons = joystick.get_numbuttons()
|
|
||||||
textPrint.print(screen, "Number of buttons: {}".format(buttons) )
|
|
||||||
textPrint.indent()
|
|
||||||
|
|
||||||
for i in range( buttons ):
|
|
||||||
button = joystick.get_button( i )
|
|
||||||
textPrint.print(screen, "Button {:>2} value: {}".format(i,button) )
|
|
||||||
if button==1:
|
|
||||||
lastContact=datetime.now()
|
|
||||||
#if i==7 and button==1:
|
|
||||||
# print('GAS')
|
|
||||||
# drive_forw()
|
|
||||||
#elif i==6 and button==1:
|
|
||||||
# print('STOP')
|
|
||||||
# drive_backw()
|
|
||||||
if i==LIGHT and button==1 and not lpress:
|
|
||||||
light=not light
|
|
||||||
lpress=True
|
|
||||||
turn_light(light)
|
|
||||||
print('Light: {}'.format(light))
|
|
||||||
elif i==LIGHT and button==0:
|
|
||||||
lpress=False
|
|
||||||
elif i==MUSIC and button==1 and not play and not ppress:
|
|
||||||
ppress=True
|
|
||||||
sound.play()
|
|
||||||
play=True
|
|
||||||
print('Sound: {}'.format(play))
|
|
||||||
elif i==MUSIC and button==1 and play and not ppress:
|
|
||||||
ppress=True
|
|
||||||
sound.stop()
|
|
||||||
play=False
|
|
||||||
print('Sound: {}'.format(play))
|
|
||||||
elif i==MUSIC and button==0 and ppress:
|
|
||||||
ppress=False
|
|
||||||
elif i==VOLUP and button==1 and not voluppress:
|
|
||||||
sound.set_volume(sound.get_volume()+0.1)
|
|
||||||
print('Volume: {}'.format(sound.get_volume()))
|
|
||||||
voluppress=True
|
|
||||||
elif i==VOLUP and button==0:
|
|
||||||
voluppress=False
|
|
||||||
elif i== VOLDO and button==0:
|
|
||||||
voldopress=False
|
|
||||||
elif i==VOLDO and button==1 and not voldopress:
|
|
||||||
sound.set_volume(sound.get_volume()-0.1)
|
|
||||||
print('Volume: {}'.format(sound.get_volume()))
|
|
||||||
voldopress=True
|
|
||||||
elif i==RECSTART and button==1 and not recpress:
|
|
||||||
recording=not recording
|
|
||||||
turn_rec(recording)
|
|
||||||
print('Recording: {}'.format(recording))
|
|
||||||
recpress=True
|
|
||||||
elif i==RECSTART and button==0:
|
|
||||||
recpress=False
|
|
||||||
|
|
||||||
textPrint.unindent()
|
|
||||||
|
|
||||||
# Hat switch. All or nothing for direction, not like joysticks.
|
|
||||||
# Value comes back in an array.
|
|
||||||
hats = joystick.get_numhats()
|
|
||||||
textPrint.print(screen, "Number of hats: {}".format(hats) )
|
|
||||||
textPrint.indent()
|
|
||||||
|
|
||||||
for i in range( hats ):
|
|
||||||
hat = joystick.get_hat( i )
|
|
||||||
textPrint.print(screen, "Hat {} value: {}".format(i, str(hat)) )
|
|
||||||
if hat==(-1,0):
|
|
||||||
print('LEFT')
|
|
||||||
drive_left()
|
|
||||||
left=True
|
|
||||||
right=False
|
|
||||||
lastContact=datetime.now()
|
|
||||||
elif hat==(1,0):
|
|
||||||
print('RIGHT')
|
|
||||||
drive_right()
|
|
||||||
right=True
|
|
||||||
left=False
|
|
||||||
lastContact=datetime.now()
|
|
||||||
else:
|
|
||||||
reset_turn()
|
|
||||||
left=False
|
|
||||||
right=False
|
|
||||||
textPrint.unindent()
|
|
||||||
|
|
||||||
textPrint.unindent()
|
|
||||||
|
|
||||||
printDriveData()
|
|
||||||
doSubroutine()
|
|
||||||
|
|
||||||
|
|
||||||
# ALL CODE TO DRAW SHOULD GO ABOVE THIS COMMENT
|
|
||||||
|
|
||||||
# Go ahead and update the screen with what we've drawn.
|
|
||||||
pygame.display.flip()
|
|
||||||
|
|
||||||
# Limit to 20 frames per second
|
|
||||||
clock.tick(20)
|
|
||||||
|
|
||||||
# Close the window and quit.
|
if __name__ == '__main__':
|
||||||
# If you forget this line, the program will 'hang'
|
main()
|
||||||
# on exit if running from IDLE.
|
|
||||||
sensor.clean()
|
|
||||||
pygame.quit ()
|
|
@ -0,0 +1,366 @@
|
|||||||
|
import pygame, picamera #,gyro
|
||||||
|
from lib import ultrasonic
|
||||||
|
from datetime import datetime
|
||||||
|
from subprocess import call
|
||||||
|
import RPi.GPIO as GPIO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Define some colors
|
||||||
|
BLACK = ( 0, 0, 0)
|
||||||
|
WHITE = ( 255, 255, 255)
|
||||||
|
# --ultrasonic--
|
||||||
|
sensor= ultrasonic.Sensor()
|
||||||
|
sensor.init(11,7)
|
||||||
|
# -- Nightmode
|
||||||
|
# WHITE, BLACK=BLACK,WHITE
|
||||||
|
# Pins BCM
|
||||||
|
motor = 16
|
||||||
|
lightpin=15
|
||||||
|
#
|
||||||
|
# --config--
|
||||||
|
use_camera=False
|
||||||
|
use_gyro_preview=False
|
||||||
|
#--
|
||||||
|
forpress = False
|
||||||
|
light = False
|
||||||
|
lpress = False
|
||||||
|
play = False
|
||||||
|
ppress = False
|
||||||
|
voluppress = False
|
||||||
|
voldopress = False
|
||||||
|
recpress=False
|
||||||
|
recording=False
|
||||||
|
left=False
|
||||||
|
right=False
|
||||||
|
lastContact=datetime.now()
|
||||||
|
if use_camera:
|
||||||
|
cam = picamera.PiCamera()
|
||||||
|
|
||||||
|
top_view = pygame.image.load('top_view.png')
|
||||||
|
top_view= pygame.transform.scale(top_view, (192, 108))
|
||||||
|
|
||||||
|
# Axis
|
||||||
|
GAS = 5
|
||||||
|
STOP = 2
|
||||||
|
|
||||||
|
# Buttons
|
||||||
|
MUSIC = 1
|
||||||
|
LIGHT = 0
|
||||||
|
VOLUP = 5
|
||||||
|
VOLDO = 4
|
||||||
|
RECSTART = 3
|
||||||
|
|
||||||
|
# setup the relais
|
||||||
|
GPIO.setup(motor,GPIO.OUT)
|
||||||
|
GPIO.setup(lightpin,GPIO.OUT)
|
||||||
|
GPIO.output(motor,True)
|
||||||
|
GPIO.output(lightpin, True)
|
||||||
|
# ____________________________
|
||||||
|
# -- driving functions
|
||||||
|
def drive_forw():
|
||||||
|
GPIO.output(motor,False)
|
||||||
|
return
|
||||||
|
|
||||||
|
def drive_backw():
|
||||||
|
print(drive_backw)
|
||||||
|
return
|
||||||
|
|
||||||
|
def reset_dire():
|
||||||
|
GPIO.output(motor,True)
|
||||||
|
return
|
||||||
|
|
||||||
|
def drive_left():
|
||||||
|
if not left:
|
||||||
|
call(['python', './lib/servolib.py','left'])
|
||||||
|
return
|
||||||
|
|
||||||
|
def drive_right():
|
||||||
|
if not right:
|
||||||
|
call(['python', './lib/servolib.py','right'])
|
||||||
|
return
|
||||||
|
|
||||||
|
def reset_turn():
|
||||||
|
if left or right:
|
||||||
|
call(['python','./lib/servolib.py'])
|
||||||
|
return
|
||||||
|
# ____________________________
|
||||||
|
# -- special functions
|
||||||
|
def turn_light(shine):
|
||||||
|
if shine:
|
||||||
|
GPIO.output(lightpin, False)
|
||||||
|
else:
|
||||||
|
GPIO.output(lightpin, True)
|
||||||
|
return
|
||||||
|
|
||||||
|
def turn_rec(*record):
|
||||||
|
#if record:
|
||||||
|
#cam.start_recording('record.h264')
|
||||||
|
#return
|
||||||
|
#else:
|
||||||
|
#cam.stop_recording()
|
||||||
|
#return
|
||||||
|
if use_camera:
|
||||||
|
try:
|
||||||
|
cam.capture('image.jpg', resize=(192 * 2, 108 * 2))
|
||||||
|
cam.capture("./Images/image{}.jpg".format(str(datetime.now()).replace(':','_')))
|
||||||
|
except Exception as error:
|
||||||
|
print(error)
|
||||||
|
|
||||||
|
def imgRefresh():
|
||||||
|
#turn_rec(True)
|
||||||
|
image = None
|
||||||
|
try:
|
||||||
|
image = pygame.image.load('image.jpg')
|
||||||
|
image = pygame.transform.scale(image, (192*2, 108*2))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
screen.blit(image, (500, 10))
|
||||||
|
#gyro_output = gyro.getAllOut()
|
||||||
|
#rotation = gyro_output['rot']
|
||||||
|
if use_gyro_preview:
|
||||||
|
top_view = pygame.image.load('top_view.png')
|
||||||
|
# The scaling of the top_view Spider
|
||||||
|
scal_x = abs(int(192 * ((abs(rotation[0]) / 90) - 1)))
|
||||||
|
scal_y = abs(int(108 * ((abs(rotation[1]) / 90) - 1)) - 1)
|
||||||
|
top_view = pygame.transform.scale(top_view, (scal_x, scal_y))
|
||||||
|
screen.blit(top_view, (550 - (scal_x / 2), 300 - (scal_y / 2)))
|
||||||
|
|
||||||
|
def printDriveData():
|
||||||
|
textPrint.print(screen,"")
|
||||||
|
textPrint.print(screen,"Sound Information")
|
||||||
|
textPrint.print(screen, " Sound: {}".format(play))
|
||||||
|
textPrint.print(screen, " Volume: {}".format(sound.get_volume()))
|
||||||
|
textPrint.print(screen, "Light: {}".format(light))
|
||||||
|
textPrint.print(screen, "Last Controller Input: {}".format((datetime.now()-lastContact).seconds))
|
||||||
|
#gyro_output=gyro.getAllOut()
|
||||||
|
#rotation=gyro_output['rot']
|
||||||
|
#textPrint.print(screen, "Rotation: X:{}; Y:{}".format(rotation[0],rotation[1]))
|
||||||
|
#acceleration = gyro_output['acc_sca']
|
||||||
|
#textPrint.print(screen, "Acceleration: X:{}; Y:{}; Z:{}".format(acceleration[0], acceleration[1],acceleration[2]))
|
||||||
|
distance=sensor.echo()
|
||||||
|
textPrint.print(screen, "Distance: {} cm".format(distance))
|
||||||
|
#if distance<40:
|
||||||
|
# turn_rec()
|
||||||
|
|
||||||
|
def doSubroutine():
|
||||||
|
if abs((datetime.now()-lastContact).seconds)==30:
|
||||||
|
print('Contact Lost')
|
||||||
|
imgRefresh()
|
||||||
|
|
||||||
|
# ____________________________
|
||||||
|
class TextPrint:
|
||||||
|
def __init__(self):
|
||||||
|
self.reset()
|
||||||
|
self.font = pygame.font.Font(None, 20)
|
||||||
|
|
||||||
|
def print(self, screen, textString):
|
||||||
|
textBitmap = self.font.render(textString, True, BLACK)
|
||||||
|
screen.blit(textBitmap, [self.x, self.y])
|
||||||
|
self.y += self.line_height
|
||||||
|
|
||||||
|
def reset(self):
|
||||||
|
self.x = 10
|
||||||
|
self.y = 10
|
||||||
|
self.line_height = 15
|
||||||
|
|
||||||
|
def indent(self):
|
||||||
|
self.x += 10
|
||||||
|
|
||||||
|
def unindent(self):
|
||||||
|
self.x -= 10
|
||||||
|
|
||||||
|
pygame.init()
|
||||||
|
|
||||||
|
# ________________________
|
||||||
|
# -- music playback
|
||||||
|
pygame.mixer.init()
|
||||||
|
sound=pygame.mixer.Sound('./sounds/gasgasgas.wav')
|
||||||
|
sound.set_volume(0.3)
|
||||||
|
# ________________________
|
||||||
|
|
||||||
|
# Set the width and height of the screen [width,height]
|
||||||
|
size = [1000, 700]
|
||||||
|
screen = pygame.display.set_mode(size)
|
||||||
|
|
||||||
|
pygame.display.set_caption("SPYDER STEUERZENTRALE")
|
||||||
|
|
||||||
|
# Loop until the user clicks the close button.
|
||||||
|
done = False
|
||||||
|
|
||||||
|
# Used to manage how fast the screen updates
|
||||||
|
clock = pygame.time.Clock()
|
||||||
|
|
||||||
|
# Initialize the joysticks
|
||||||
|
pygame.joystick.init()
|
||||||
|
|
||||||
|
# Get ready to print
|
||||||
|
textPrint = TextPrint()
|
||||||
|
turn_rec(True)
|
||||||
|
image=pygame.image.load('image.jpg')
|
||||||
|
image=pygame.transform.scale(image,(192*2,108*2))
|
||||||
|
count=0
|
||||||
|
|
||||||
|
# -------- Main Program Loop -----------
|
||||||
|
while done==False:
|
||||||
|
# EVENT PROCESSING STEP
|
||||||
|
for event in pygame.event.get(): # User did something
|
||||||
|
if event.type == pygame.QUIT: # If user clicked close
|
||||||
|
done=True # Flag that we are done so we exit this loop
|
||||||
|
|
||||||
|
# Possible joystick actions: JOYAXISMOTION JOYBALLMOTION JOYBUTTONDOWN JOYBUTTONUP JOYHATMOTIO
|
||||||
|
|
||||||
|
|
||||||
|
# DRAWING STEP
|
||||||
|
# First, clear the screen to white. Don't put other drawing commands
|
||||||
|
# above this, or they will be erased with this command.
|
||||||
|
screen.fill(WHITE)
|
||||||
|
textPrint.reset()
|
||||||
|
|
||||||
|
# Get count of joysticks
|
||||||
|
joystick_count = pygame.joystick.get_count()
|
||||||
|
|
||||||
|
textPrint.print(screen, "Number of joysticks: {}".format(joystick_count) )
|
||||||
|
textPrint.indent()
|
||||||
|
|
||||||
|
# For each joystick:
|
||||||
|
for i in range(joystick_count):
|
||||||
|
joystick = pygame.joystick.Joystick(i)
|
||||||
|
joystick.init()
|
||||||
|
|
||||||
|
textPrint.print(screen, "Joystick {}".format(i) )
|
||||||
|
textPrint.indent()
|
||||||
|
|
||||||
|
# Get the name from the OS for the controller/joystick
|
||||||
|
#name = joystick.get_name()
|
||||||
|
#textPrint.print(screen, "Joystick name: {}".format(name) )
|
||||||
|
|
||||||
|
# Usually axis run in pairs, up/down for one, and left/right for
|
||||||
|
# the other.
|
||||||
|
axes = joystick.get_numaxes()
|
||||||
|
textPrint.print(screen, "Number of axes: {}".format(axes) )
|
||||||
|
textPrint.indent()
|
||||||
|
|
||||||
|
for i in range( axes ):
|
||||||
|
axis = joystick.get_axis( i )
|
||||||
|
textPrint.print(screen, "Axis {} value: {:>6.3f}".format(i, axis) )
|
||||||
|
if i==STOP and axis>0.1:
|
||||||
|
print('STOP')
|
||||||
|
drive_backw()
|
||||||
|
lastContact=datetime.now()
|
||||||
|
elif i==GAS and axis>0.1:
|
||||||
|
print('GAS')
|
||||||
|
if not forpress:
|
||||||
|
drive_forw()
|
||||||
|
forpress=True
|
||||||
|
lastContact=datetime.now()
|
||||||
|
elif i==GAS and axis<0.1:
|
||||||
|
if forpress:
|
||||||
|
reset_dire()
|
||||||
|
print('RESETDRIVE')
|
||||||
|
forpress=False
|
||||||
|
|
||||||
|
textPrint.unindent()
|
||||||
|
|
||||||
|
buttons = joystick.get_numbuttons()
|
||||||
|
textPrint.print(screen, "Number of buttons: {}".format(buttons) )
|
||||||
|
textPrint.indent()
|
||||||
|
|
||||||
|
for i in range( buttons ):
|
||||||
|
button = joystick.get_button( i )
|
||||||
|
textPrint.print(screen, "Button {:>2} value: {}".format(i,button) )
|
||||||
|
if button==1:
|
||||||
|
lastContact=datetime.now()
|
||||||
|
#if i==7 and button==1:
|
||||||
|
# print('GAS')
|
||||||
|
# drive_forw()
|
||||||
|
#elif i==6 and button==1:
|
||||||
|
# print('STOP')
|
||||||
|
# drive_backw()
|
||||||
|
if i==LIGHT and button==1 and not lpress:
|
||||||
|
light=not light
|
||||||
|
lpress=True
|
||||||
|
turn_light(light)
|
||||||
|
print('Light: {}'.format(light))
|
||||||
|
elif i==LIGHT and button==0:
|
||||||
|
lpress=False
|
||||||
|
elif i==MUSIC and button==1 and not play and not ppress:
|
||||||
|
ppress=True
|
||||||
|
sound.play()
|
||||||
|
play=True
|
||||||
|
print('Sound: {}'.format(play))
|
||||||
|
elif i==MUSIC and button==1 and play and not ppress:
|
||||||
|
ppress=True
|
||||||
|
sound.stop()
|
||||||
|
play=False
|
||||||
|
print('Sound: {}'.format(play))
|
||||||
|
elif i==MUSIC and button==0 and ppress:
|
||||||
|
ppress=False
|
||||||
|
elif i==VOLUP and button==1 and not voluppress:
|
||||||
|
sound.set_volume(sound.get_volume()+0.1)
|
||||||
|
print('Volume: {}'.format(sound.get_volume()))
|
||||||
|
voluppress=True
|
||||||
|
elif i==VOLUP and button==0:
|
||||||
|
voluppress=False
|
||||||
|
elif i== VOLDO and button==0:
|
||||||
|
voldopress=False
|
||||||
|
elif i==VOLDO and button==1 and not voldopress:
|
||||||
|
sound.set_volume(sound.get_volume()-0.1)
|
||||||
|
print('Volume: {}'.format(sound.get_volume()))
|
||||||
|
voldopress=True
|
||||||
|
elif i==RECSTART and button==1 and not recpress:
|
||||||
|
recording=not recording
|
||||||
|
turn_rec(recording)
|
||||||
|
print('Recording: {}'.format(recording))
|
||||||
|
recpress=True
|
||||||
|
elif i==RECSTART and button==0:
|
||||||
|
recpress=False
|
||||||
|
|
||||||
|
textPrint.unindent()
|
||||||
|
|
||||||
|
# Hat switch. All or nothing for direction, not like joysticks.
|
||||||
|
# Value comes back in an array.
|
||||||
|
hats = joystick.get_numhats()
|
||||||
|
textPrint.print(screen, "Number of hats: {}".format(hats) )
|
||||||
|
textPrint.indent()
|
||||||
|
|
||||||
|
for i in range( hats ):
|
||||||
|
hat = joystick.get_hat( i )
|
||||||
|
textPrint.print(screen, "Hat {} value: {}".format(i, str(hat)) )
|
||||||
|
if hat==(-1,0):
|
||||||
|
print('LEFT')
|
||||||
|
drive_left()
|
||||||
|
left=True
|
||||||
|
right=False
|
||||||
|
lastContact=datetime.now()
|
||||||
|
elif hat==(1,0):
|
||||||
|
print('RIGHT')
|
||||||
|
drive_right()
|
||||||
|
right=True
|
||||||
|
left=False
|
||||||
|
lastContact=datetime.now()
|
||||||
|
else:
|
||||||
|
reset_turn()
|
||||||
|
left=False
|
||||||
|
right=False
|
||||||
|
textPrint.unindent()
|
||||||
|
|
||||||
|
textPrint.unindent()
|
||||||
|
|
||||||
|
printDriveData()
|
||||||
|
doSubroutine()
|
||||||
|
|
||||||
|
|
||||||
|
# ALL CODE TO DRAW SHOULD GO ABOVE THIS COMMENT
|
||||||
|
|
||||||
|
# Go ahead and update the screen with what we've drawn.
|
||||||
|
pygame.display.flip()
|
||||||
|
|
||||||
|
# Limit to 20 frames per second
|
||||||
|
clock.tick(20)
|
||||||
|
|
||||||
|
# Close the window and quit.
|
||||||
|
# If you forget this line, the program will 'hang'
|
||||||
|
# on exit if running from IDLE.
|
||||||
|
sensor.clean()
|
||||||
|
pygame.quit ()
|
@ -1,8 +0,0 @@
|
|||||||
import sys
|
|
||||||
import Adafruit_DHT
|
|
||||||
|
|
||||||
while True:
|
|
||||||
|
|
||||||
humidity, temperature = Adafruit_DHT.read_retry(11, 14)
|
|
||||||
|
|
||||||
print 'Temp: {} C Humidity: {} %'.format(temperature, humidity)
|
|
@ -1,6 +0,0 @@
|
|||||||
import ultrasonic
|
|
||||||
sensor=ultrasonic.Sensor()
|
|
||||||
sensor.init(11,7)
|
|
||||||
print('Beginn der Messung')
|
|
||||||
print(sensor.echo())
|
|
||||||
sensor.clean()
|
|
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
cd ..
|
||||||
|
if [ -d "spydian/" ];then
|
||||||
|
sudo git clone https://bitbucket.org/trivernis/spydian.git spydian_update
|
||||||
|
sudo rsync -a ./spydian_update/ ./spydian/
|
||||||
|
sudo rm -r ./spydian_update/
|
||||||
|
sudo chmod -R u+rw ./spydian/
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
sudo git clone https://bitbucket.org/trivernis/spydian.git spydian
|
||||||
|
sudo chmod -R u+rw ./spydian/
|
||||||
|
exit 0
|
||||||
|
fi
|
Loading…
Reference in New Issue