Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
EMG analysis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ym13n22
EMG analysis
Commits
f7092b6f
Commit
f7092b6f
authored
10 months ago
by
ym13n22
Browse files
Options
Downloads
Patches
Plain Diff
first version done, no hardware combination,thread need to fix
parent
2161f362
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
integration/Window.py
+11
-5
11 additions, 5 deletions
integration/Window.py
integration/trained-copy2.txt
+2
-0
2 additions, 0 deletions
integration/trained-copy2.txt
with
13 additions
and
5 deletions
integration/Window.py
+
11
−
5
View file @
f7092b6f
...
...
@@ -658,14 +658,14 @@ class trainingInterface:
def
EMG_connect_HandOpen
(
self
):
self
.
arduino_EMG
=
serial
.
Serial
(
'
COM5
'
,
9600
,
timeout
=
1
)
gesture
=
"
handOpen
"
self
.
start_countdown
(
11
)
self
.
start_countdown
(
5
)
self
.
displayAndsaveDate
()
def
handCloseButton
(
self
):
self
.
arduino_EMG
=
serial
.
Serial
(
'
COM5
'
,
9600
,
timeout
=
1
)
gesture
=
"
handOpen
"
self
.
start_countdown_close
(
11
)
self
.
start_countdown_close
(
5
)
self
.
displayAndsaveDate
()
...
...
@@ -877,7 +877,7 @@ class Algorithm:
class
gameScreen
:
def
__init__
(
self
,
root
):
self
.
root
=
root
self
.
root
.
title
(
"
preparation
Interface
"
)
self
.
root
.
title
(
"
game
Interface
"
)
self
.
width
=
1000
self
.
height
=
600
self
.
width
=
1000
...
...
@@ -923,7 +923,11 @@ class gameScreen:
self
.
gesture_predict
.
config
(
font
=
(
"
Arial
"
,
12
))
self
.
gesture_predict
.
place
(
relx
=
0.2
,
rely
=
0.7
,
anchor
=
'
w
'
)
self
.
a
,
self
.
b
=
self
.
load_Function
()
self
.
EMG_Display
()
self
.
emg_thread
=
threading
.
Thread
(
target
=
self
.
EMG_Display
)
self
.
emg_thread
.
start
()
#self.EMG_Display()
if
'
COM6
'
in
self
.
ports
:
self
.
column_limit
=
9
self
.
last_averageRoll
=
0
...
...
@@ -944,7 +948,9 @@ class gameScreen:
self
.
yaw_label
=
tk
.
Label
(
self
.
frame1
,
text
=
"
yaw is :
"
)
self
.
yaw_label
.
config
(
font
=
(
"
Arial
"
,
12
))
self
.
yaw_label
.
place
(
relx
=
0.2
,
rely
=
0.5
,
anchor
=
'
w
'
)
self
.
IMU_Display
()
self
.
imu_thread
=
threading
.
Thread
(
target
=
self
.
IMU_Display
)
self
.
imu_thread
.
start
()
#self.IMU_Display()
def
_decode
(
self
,
serial_data
):
...
...
This diff is collapsed.
Click to expand it.
integration/trained-copy2.txt
0 → 100644
+
2
−
0
View file @
f7092b6f
-0.5612065675615708
54.4000262056327
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment