Skip to main content

MoboBot Python Client Live Coding Library

Project description

MoboBot Python Client Live Coding Library

Python UDP Interface Client Library for MoboBot.

NOTE: It works with the MoboBot Firmware It currently connects to SSID: mobobot1234, PASSWORD: mobobot1234

Install

  • you'll need to pip install the pyserial library
      pip3 install mobobot-client   //linux or mac
    
    OR
      pip install mobobot-client  //windows
    

Uninstall

  • you'll need to pip install the pyserial library
      pip3 uninstall mobobot-client   //linux or mac
    
      pip uninstall mobobot-client  //windows
    

example code 1

from mobobot_client import MoboBotClient
import time

robot = MoboBotClient()
robot.connect("mobobot.local", 8888, 0.018)
robot.start_heartbeat()

v = 0.1
w = 0.5

robot.writeRobotVel(0.0, 0.0)


while True:
  # w*=-1.0
  time.sleep(2.0)
  robot.writeRobotVel(v, 0.0)
  time.sleep(5.0)
  robot.writeRobotVel(0.0, 0.0)
  time.sleep(2.0)
  robot.writeRobotVel(0.0, w)
  time.sleep(5.0)
  robot.writeRobotVel(0.0, 0.0)

example code 2

from mobobot_client import MoboBotClient
import time

robot = MoboBotClient()
robot.connect("mobobot.local", 8888, 0.018)
robot.start_heartbeat()

time.sleep(2.0)

while True:
  robot.buzzerOn()

  time.sleep(2.0)
  robot.rgbOn(255, 0, 0)
  # robot.writeServo1Angle(0)
  robot.writeServo2Angle(0)
  print("sonar: ", robot.readSonar())
  print("line1: ", robot.readLineSensor1())
  print("line2: ", robot.readLineSensor2())

  time.sleep(2.0)
  robot.rgbOn(0, 255, 0)
  # robot.writeServo1Angle(90)
  robot.writeServo2Angle(90)
  print("sonar: ", robot.readSonar())
  print("line1: ", robot.readLineSensor1())
  print("line2: ", robot.readLineSensor2())

  robot.buzzerOff()

  time.sleep(2.0)
  robot.rgbOn(0, 0, 255)
  # robot.writeServo1Angle(0)
  robot.writeServo2Angle(0)
  print("sonar: ", robot.readSonar())
  print("line1: ", robot.readLineSensor1())
  print("line2: ", robot.readLineSensor2())

  time.sleep(2.0)
  robot.rgbOff()
  # robot.writeServo1Angle(-90)
  robot.writeServo2Angle(-90)
  print("sonar: ", robot.readSonar())
  print("line1: ", robot.readLineSensor1())
  print("line2: ", robot.readLineSensor2())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mobobot_client-0.0.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mobobot_client-0.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file mobobot_client-0.0.1.tar.gz.

File metadata

  • Download URL: mobobot_client-0.0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for mobobot_client-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0e6b56cabcacd7fe9cf532d4008e9ce4e116042fa932daaed3d7cdbbecbd1580
MD5 c886af235437a25870fabc01fb879ac6
BLAKE2b-256 8514232d4ed49fb111f9f732b64b4e24e6a579feacb85691876969b0030f67c2

See more details on using hashes here.

File details

Details for the file mobobot_client-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: mobobot_client-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for mobobot_client-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5d1df2daf69011a88c8f6520f8bbf1031fe273cebe4033e48aa9c7cca0d3790b
MD5 a6e240a5dd44b467bb5be080831f90a3
BLAKE2b-256 6705b36aa4e0c536814a9d10cb1589009ca1ca426c2698bb97463a32e68ae69a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page