Browse Source

added ArmbandInterface Klasse

videowall-pc-user 5 years ago
parent
commit
d19dee5f0f

+ 32 - 0
SketchAssistant/StaticLib1/ArmbandInterface.cpp

@@ -0,0 +1,32 @@
+#include "stdafx.h"
+extern "C" {
+#include "MotorHeader/ArduinoHub.h"
+}
+#include <ctime>
+
+
+namespace StaticLib1
+{		
+	class UnitTest1
+	{
+
+		ArduinoHub* armband;
+
+	public : 
+
+		int main() {
+			setupMotors();
+			startVibrate(1, 1.0);
+		}
+
+		void setupMotors() {
+			ArduinoHub_init(armband, "4", (ArduinoHub_Type) 'P');
+		}
+		void startVibrate(uint8_t tactor, float intensity) {
+			ArduinoHub_startVibration(armband, tactor, intensity);
+		}
+		void nstopVibration(uint8_t tactor) {
+			ArduinoHub_stopVibration(armband, tactor);
+		}
+	};
+}

+ 2 - 0
SketchAssistant/StaticLib1/Motorheader/Actuator.h

@@ -17,6 +17,8 @@
 #include <ctime>
 //#include <time.h>
 
+
+
 typedef struct Actuator
 {
     bool active;

+ 1 - 1
SketchAssistant/StaticLib1/StaticLib1.vcxproj

@@ -163,7 +163,7 @@
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
     </ClCompile>
-    <ClCompile Include="UnitTest1.cpp">
+    <ClCompile Include="ArmbandInterface.cpp">
       <SubType>
       </SubType>
     </ClCompile>

+ 1 - 1
SketchAssistant/StaticLib1/StaticLib1.vcxproj.filters

@@ -38,7 +38,7 @@
     <ClCompile Include="stdafx.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="UnitTest1.cpp">
+    <ClCompile Include="ArmbandInterface.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>

+ 5 - 0
SketchAssistant/StaticLib1/packages.config

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="pthreads" version="2.9.1.4" targetFramework="native" />
+  <package id="pthreads.redist" version="2.9.1.4" targetFramework="native" />
+</packages>