forward_right_motor = motor_ibt2.motor1_ibt2(4,17) backward_left_motor = motor_ibt2.motor1_ibt2(15,14) backward_right_motor = motor_ibt2.motor1_ibt2(23,18) ################################ # VARIABLES FOR ROBOTIC ARM: ################################# baseMotorSpeed = 0 baseActuator = 0; armActuator = 0; clawPitch = 0; clawRoll = 0; clawOpenClose = 0; Motor1_baseMotor = motor_ibt2.motor1_ibt2(25,24); #IBT2 (2 pin) Motor2_baseActuator = motor_l298n.motor1_L298n_NOPWM(6,13);#L298n (2 pin) Motor3_armActuator = motor_l298n.motor1_L298n_NOPWM(19,26); #L298n (2 pin) Motor4_clawPitch = motor_l298n.motor1_L298n_NOPWM(12,1); #L298n (2 pin) Motor5_clawRoll = motor_l298n.motor1_L298n(21,20,16); #L298n (3 pin) Motor6_clawOpenClose = motor_l298n.motor1_L298n_NOPWM(7,8);#L298n (2 pin) # ###################################################################################################################### ########## Function to Create a Socket ( socket connect two computers) ###################################################################################################################### def create_socket(): try: #Creating following 3 global variables global host global port global s #This is socket variable which is named s
backward_left_motor = motor_ibt2.motor1_ibt2(4, 17) backward_right_motor = motor_ibt2.motor1_ibt2(18, 23) ################################ # VARIABLES FOR ROBOTIC ARM: ################################# baseMotorSpeed = 0 baseActuator = 0 armActuator = 0 clawPitch = 0 clawRoll = 0 clawOpenClose = 0 Motor1_baseMotor = motor_ibt2.motor1_ibt2(25, 24) #IBT2 (2 pin) Motor2_baseActuator = motor_l298n.motor1_L298n_NOPWM(6, 13) #L298n (2 pin) Motor3_armActuator = motor_l298n.motor1_L298n_NOPWM(19, 26) #L298n (2 pin) Motor4_clawPitch = motor_l298n.motor1_L298n(12, 1, 10) #L298n (2 pin) Motor5_clawRoll = motor_l298n.motor1_L298n(21, 20, 16) #L298n (3 pin) Motor6_clawOpenClose = motor_l298n.motor1_L298n_NOPWM(7, 8) #L298n (2 pin) # ######################################################### ######################################################### groundIP = "192.168.185.58"
forward_right_motor = motor_ibt2.motor1_ibt2(25,8) backward_left_motor = motor_ibt2.motor1_ibt2(19,26) backward_right_motor = motor_ibt2.motor1_ibt2(7,1) ################################ # VARIABLES FOR ROBOTIC ARM: ################################# baseMotorSpeed = 0 baseActuator = 0; armActuator = 0; clawPitch = 0; clawRoll = 0; clawOpenClose = 0; Motor1_baseMotor = motor_ibt2.motor1_ibt2(3,4); #IBT2 (2 pin) Motor2_baseActuator = motor_l298n.motor1_L298n_NOPWM(5,6);#L298n (2 pin) Motor3_armActuator = motor_l298n.motor1_L298n_NOPWM(8,9); #L298n (2 pin) Motor4_clawPitch = motor_l298n.motor1_L298n_NOPWM(11,12); #L298n (2 pin) Motor5_clawRoll = motor_l298n.motor1_L298n(14,15,16); #L298n (3 pin) Motor6_clawOpenClose = motor_l298n.motor1_L298n_NOPWM(17,18);#L298n (2 pin) ######################################################### ######################################################### groundIP = "192.168.185.58" def IPCheckRoutine(): print(time.ctime()) response = os.system("ping -c 1 " + groundIP) if response == 0: print('BASE - CONNECTED'); else: if(mode == 0):