From 9dc5336512670826a9ed7b1adc021ff5e9021e39 Mon Sep 17 00:00:00 2001 From: Rafael Ortiz Date: Fri, 24 Jun 2011 05:47:15 +0000 Subject: initial arduino pallete impl --- diff --git a/plugins/arduino/arduino.py b/plugins/arduino/arduino.py index 08d2f1c..2f9d3ba 100644 --- a/plugins/arduino/arduino.py +++ b/plugins/arduino/arduino.py @@ -32,7 +32,7 @@ _logger = logging.getLogger('TurtleArt-activity plugin Arduino') from gettext import gettext as _ -from taarduino import TAArduino # Arduino setup +#from taarduino import TAArduino # Arduino setup TODO look at rfid implementation for arduino setup class Arduino(Plugin): @@ -44,13 +44,13 @@ class Arduino(Plugin): def setup(self): # set up Arduino-specific blocks palette = make_palette('Arduino', # the name of your palette - colors=["#00FF00", "#00A000"], + colors=["#006060", "#A00000"], help_string=_('Arduino Commands')) primitive_dictionary['blink'] = self._blink_boton palette.add_block('blink', # the name of your block - style='basic-style-1arg', # the block style + style='basic-style', # the block style label=_('blink'), # the label for the block prim_name='blink', # code reference (see below) help_string=_('blinks the onboard arduino led')) @@ -59,7 +59,7 @@ class Arduino(Plugin): # of arguments, 0 in this case, and the function to call, in this # case, the canvas function to set the heading. - self._parent.lc.def_prim('blink', 1, lambda self, blink: primitive_dictionary['blink'](blink)) #aca debe ir las funciones para hacer blink con arduino + self._parent.lc.def_prim('blink', 0, lambda self, blink: primitive_dictionary['blink'](blink)) #aca debe ir las funciones para hacer blink con arduino def _blink_boton(self, blink): print "El valor del boton ", blink -- cgit v0.9.1