Ejemplo n.º 1
0
 public static String _ioioconnect() throws Exception {
   // BA.debugLineNum = 49;BA.debugLine="Sub IOIOConnect";
   // BA.debugLineNum = 50;BA.debugLine="Try";
   try { // BA.debugLineNum = 51;BA.debugLine="YOYO.Initialize";
     _yoyo.Initialize();
     // BA.debugLineNum = 52;BA.debugLine="YOYO.WaitForConnect";
     _yoyo.WaitForConnect();
     // BA.debugLineNum = 53;BA.debugLine="pin33_SensorFuerza= YOYO.OpenAnalogInput(33)";
     _pin33_sensorfuerza.setObject((ioio.lib.api.AnalogInput) (_yoyo.OpenAnalogInput((int) (33))));
     // BA.debugLineNum = 54;BA.debugLine="pin11_Zumbador= YOYO.OpenPwmOutput(11,pin11_Zumb";
     _pin11_zumbador.setObject(
         (ioio.lib.api.PwmOutput)
             (_yoyo.OpenPwmOutput((int) (11), _pin11_zumbador.OP_NORMAL, (int) (2000))));
   } catch (Exception e26) {
     processBA.setLastException(
         e26); // BA.debugLineNum = 56;BA.debugLine="Log(\"YOYO Exception: \"&
               // LastException.Message)";
     anywheresoftware.b4a.keywords.Common.Log(
         "YOYO Exception: "
             + anywheresoftware.b4a.keywords.Common.LastException(mostCurrent.activityBA)
                 .getMessage());
   }
   ;
   // BA.debugLineNum = 58;BA.debugLine="End Sub";
   return "";
 }
Ejemplo n.º 2
0
 public static String _ioioclose() throws Exception {
   // BA.debugLineNum = 60;BA.debugLine="Sub IOIOClose";
   // BA.debugLineNum = 61;BA.debugLine="Try";
   try { // BA.debugLineNum = 62;BA.debugLine="pin33_SensorFuerza.Close";
     _pin33_sensorfuerza.Close();
     // BA.debugLineNum = 63;BA.debugLine="YOYO.Disconnect";
     _yoyo.Disconnect();
     // BA.debugLineNum = 64;BA.debugLine="YOYO.WaitForDisconnect";
     _yoyo.WaitForDisconnect();
   } catch (Exception e35) {
     processBA.setLastException(
         e35); // BA.debugLineNum = 66;BA.debugLine="Log(\"YOYO Close Exception: \"&
               // LastException.Mess";
     anywheresoftware.b4a.keywords.Common.Log(
         "YOYO Close Exception: "
             + anywheresoftware.b4a.keywords.Common.LastException(mostCurrent.activityBA)
                 .getMessage());
   }
   ;
   // BA.debugLineNum = 68;BA.debugLine="End Sub";
   return "";
 }