Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
anla-xu committed Sep 6, 2024
2 parents 1e3b303 + 03af399 commit cd4f155
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pymycobot/elephantrobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,20 @@ def jog_coord(self, axis_str, direction, speed):

def get_digital_in(self, pin_number):
command = "get_digital_in(" + str(pin_number) + ")\n"
self.send_command(command)
res = self.send_command(command)
return self.string_to_int(res)

def get_digital_out(self, pin_number):
command = "get_digital_out(" + str(pin_number) + ")\n"
print(command)
self.send_command(command)
res = self.send_command(command)
return self.string_to_int(res)

def get_joint_current(self, joint_number):
command = "get_joint_current(" + str(joint_number) + ")\n"
print(command)
self.send_command(command)
res = self.send_command(command)
return self.string_to_double(res)

def set_digital_out(self, pin_number, pin_signal):
command = "set_digital_out(" + str(pin_number) + "," + str(pin_signal) + ")\n"
Expand Down

0 comments on commit cd4f155

Please sign in to comment.