I know this codes/sketches/scripts are in other post
I just want to put everything in one post for whom ever can use it
thanks to james and laksmanx, the authors of the code
The notes:
I tested it with 2 leds, 2 potentiometers, and 2 pushbuttons
I suggest that you use a pulldown resistors on the analog inputs not in use
to avoid floating readings, this same applies to the pushbuttons in use
in my test i connect the leds to pins 6 & 7
the potentiometers on pins A1 & A3 (i will use the potentiometer on pin3 for later use, a smoke/fire alarm)
the pushbuttons on pins 11 & 12
happy holidays
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.7-->
<commandGroup open="True" name="LED-Pin-Hello-WR" enabled="True" prefix="" priority="0" requiredProcess="" description="">
<command id="310" name="Arduino Startup" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>PY.ExecFile</cmdType>
<params>
<param>PY\ArduinoStartup.py</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<event>VC.Loaded</event>
</command>
<command id="798" name="Set The LED On" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>Set The LED On</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>Set The LED On</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>PY.ExecString</cmdType>
<params>
<param>arduinoWrite("dw.high.6")</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>Set The LED On</phrase>
</command>
<command id="817" name="Set The LED Off" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>Set The LED Off</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>Set The LED Off</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>PY.ExecString</cmdType>
<params>
<param>arduinoWrite("dw.low.6")</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>Set The LED Off</phrase>
</command>
<command id="779" name="Get The Value" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>PY.ExecString</cmdType>
<params>
<param>arduinoWrite("ar.1")</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>Get The Value</phrase>
</command>
<command id="796" name="Read value of pin {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>PY.ExecString</cmdType>
<params>
<param>arduinoWrite("ar.{1}")</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>Read value of pin</phrase>
<payloadRange>0,15</payloadRange>
</command>
<command id="756" name="analog value event" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>The Pin number. {1}. has a value of. {2}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>The Pin number. {1}. has a value of. {2}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<event>Analog.Pin</event>
</command>
<command id="784" name="Set pin {1} high" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>Set Pin. {1}. High</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>Set Pin. {1}. High</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>PY.ExecString</cmdType>
<params>
<param>arduinoWrite("dw.high.{1}")</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>Set pin</phrase>
<payloadRange>1,50</payloadRange>
<phrase>high</phrase>
</command>
<command id="829" name="Set pin {1} low" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>Set Pin. {1}. Low</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>Set Pin. {1}. Low</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>PY.ExecString</cmdType>
<params>
<param>arduinoWrite("dw.low.{1}")</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>Set pin</phrase>
<payloadRange>1,50</payloadRange>
<phrase>low</phrase>
</command>
<command id="736" name="hello arduino" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>PY.ExecString</cmdType>
<params>
<param>arduinoWrite("hello")</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>hello arduino</phrase>
</command>
<command id="746" name="Button One Is Pressed" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>Button One Is Pressed</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>Button One Is Pressed</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<event>ButtonOne.Pressed
</event>
</command>
<command id="398" name="Button One Is Released" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>Button One Is Released</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>Button One Is Released</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<event>ButtonOne.State.Released
</event>
</command>
<command id="399" name="Button Two Is Pressed" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>Button Two Is Pressed</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>Button Two Is Pressed</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>SMTP.Send</cmdType>
<params>
<param>7148308504@mymetropcs.com</param>
<param>Button 2 Pressed</param>
<param>The Button No. 2 Has Been Pressed</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>SMS Pressed Sent</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>SMS Pressed Sent</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<event>ButtonTwo.Pressed
</event>
</command>
<command id="400" name="Button Two Is Released" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>Button Two Is Released</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>Button Two Is Released</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>SMTP.Send</cmdType>
<params>
<param>7148308504@mymetropcs.com</param>
<param>Button 2 Release</param>
<param>The Button N. 2 Has Been Release</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>SMS Released Sent</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>SMS Released Sent</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<event>ButtonTwo.Released
</event>
</command>
</commandGroup>