Author: simplet
Date: 2008-12-08 18:40:57 +0100 (Mon, 08 Dec 2008)
New Revision: 3044

Added:
   software_suite_v2/software/scripts/multiplication/
   software_suite_v2/software/scripts/multiplication/multiplication.py
Log:
* first version. for childs ! :)


Added: software_suite_v2/software/scripts/multiplication/multiplication.py
===================================================================
--- software_suite_v2/software/scripts/multiplication/multiplication.py         
                (rev 0)
+++ software_suite_v2/software/scripts/multiplication/multiplication.py 
2008-12-08 17:40:57 UTC (rev 3044)
@@ -0,0 +1,54 @@
+#!/usr/bin/python
+# -*- coding: UTF8 -*-
+"""
+######################################################
+ Apprendre les tables de multiplications
+
+ Simplet <simplet _at_ ptigeek _dot_ net>
+#####################################################
+"""
+
+__author__  = 'Simplet <simplet _at_ ptigeek _dot_ net>'
+__appname__ = 'Multiplication'
+__version__ = '0.0.1'
+__date__    = '2008/12/08'
+__license__ = 'GPL'
+
+from tuxisalive.api import *
+import time, sys
+from random import randrange
+
+
+def ChangerTable(*args):
+    global table
+    global multiplier
+    table = table + 1
+    multiplier = -1
+
+
+tux = TuxAPI('192.168.1.5', 270)
+tux.server.autoConnect(CLIENT_LEVEL_RESTRICTED, 'Multiplication', 'NONE')
+tux.server.waitConnected(10.0)
+tux.dongle.waitConnected(10.0)
+tux.radio.waitConnected(10.0)
+if tux.access.waitAcquire(10.0, ACCESS_PRIORITY_NORMAL):
+
+   tux.button.remote.registerEventOnPressed(ChangerTable, K_OK)
+   tux.button.head.registerEventOnPressed(ChangerTable)
+     
+   table = 0
+   multiplier = 0
+   
+   while 1:
+    if multiplier > 10:
+      multiplier = 0
+      table = table + 1
+    if table > 10:
+      table = 0
+      
+    tux.tts.speak(str(table)+" fois ("+str(multiplier)+") 
"+str(table*multiplier), "Julie", 100)
+    multiplier = multiplier + 1
+
+tux.access.release()
+tux.server.disconnect()
+tux.destroy()


Property changes on: 
software_suite_v2/software/scripts/multiplication/multiplication.py
___________________________________________________________________
Name: svn:executable
   + *


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to