summaryrefslogtreecommitdiff
path: root/AT91SAM7S256/armdebug/nxt-python-fantom/examples/latency.py
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-06-03 12:11:27 +0800
committerTat-Chee Wan (USM)2011-06-03 12:11:27 +0800
commit724f0cab2008109102428c6a7393f1ec85281574 (patch)
tree7484bad0c0c44ae0042a5c9885f59391bd164f14 /AT91SAM7S256/armdebug/nxt-python-fantom/examples/latency.py
parentb45fb85344d2299d3948191cbbf0bae18dc5a946 (diff)
parenta79dc637d60b33032e951f5338fdd9b6a47a5b46 (diff)
Merge branch 'master' of ssh://svc.cs.usm.my/~/gitrepo-bare/armdebug
Diffstat (limited to 'AT91SAM7S256/armdebug/nxt-python-fantom/examples/latency.py')
-rw-r--r--AT91SAM7S256/armdebug/nxt-python-fantom/examples/latency.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/AT91SAM7S256/armdebug/nxt-python-fantom/examples/latency.py b/AT91SAM7S256/armdebug/nxt-python-fantom/examples/latency.py
deleted file mode 100644
index b4b1f26..0000000
--- a/AT91SAM7S256/armdebug/nxt-python-fantom/examples/latency.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env python
-
-import time
-import nxt.locator
-from nxt.sensor import *
-
-b = nxt.locator.find_one_brick()
-
-#Touch sensor latency test
-touch = Touch(b, PORT_1)
-start = time.time()
-for i in range(100):
- touch.get_sample()
-stop = time.time()
-print 'touch latency: %s ms' % (1000 * (stop - start) / 100.0)
-
-#Ultrasonic sensor latency test
-ultrasonic = Ultrasonic(b, PORT_4)
-start = time.time()
-for i in range(100):
- ultrasonic.get_sample()
-stop = time.time()
-print 'ultrasonic latency: %s ms' % (1000 * (stop - start) / 100.0)