Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
BalanceBoard Lab
(view source)
Revision as of 16:02, 1 July 2015
35 bytes added
,
16:02, 1 July 2015
→Python software
Line 103:
Line 103:
== Python software ==
== Python software ==
−
<
nowiki
>
+
<
syntaxhighlight lang="python"
>
from PyDAQmx import Task
from PyDAQmx import Task
from PyDAQmx.DAQmxConstants import *
from PyDAQmx.DAQmxConstants import *
Line 152:
Line 152:
print "Stop"
print "Stop"
t = numpy.array(times)
t = numpy.array(times)
−
afwijking
= numpy.mean(abs(t - numpy.mean(t)))
+
deviation
= numpy.mean(abs(t - numpy.mean(t)))
−
maxafwijking
= max(abs(t-numpy.mean(t)))
+
maxdeviation
= max(abs(t-numpy.mean(t)))
−
print numpy.mean(t),
afwijking
,
maxafwijking
+
print numpy.mean(t),
deviation
,
maxdeviation
analog_input.StopTask();
analog_input.StopTask();
−
</
nowiki
>
+
</
syntaxhighlight
>
E.vandenberge
Bureaucrats
,
Administrators
1,339
edits
Navigation menu
Personal tools
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Help
About
About the TSG
About this Wiki
FAQ
Disclaimer
Survey
Customer Survey
Tools
Special pages
Printable version