Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/nxt_plugin/ejemplo2.py
diff options
context:
space:
mode:
Diffstat (limited to 'nxt_plugin/ejemplo2.py')
-rw-r--r--nxt_plugin/ejemplo2.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/nxt_plugin/ejemplo2.py b/nxt_plugin/ejemplo2.py
new file mode 100644
index 0000000..613a11a
--- /dev/null
+++ b/nxt_plugin/ejemplo2.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+
+import nxt.locator
+from nxt.motor import *
+
+b = nxt.locator.find_one_brick()
+m_left = Motor(b, PORT_B)
+
+def spin_around(b):
+ m_left.turn(100, 360000)
+ m_right = Motor(b, PORT_C)
+ m_right.turn(-100, 360)
+
+spin_around(b)