changeset 58:fccf0f6f6a12

beep.py
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Sun, 24 Aug 2014 18:41:39 +0200
parents 9c412415a8c1
children 914f6c9612d7
files beep.py
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/beep.py	Sun Aug 24 18:41:39 2014 +0200
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import serial
+import kubik
+
+
+def beep(robot):
+        robot.beep(440, 20)
+        yield
+        robot.beep(220, 10)
+        yield
+
+
+robot = kubik.Robot(serial.Serial('/dev/rfcomm0', 9600))
+robot.run_animations([beep(robot)], 6)