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.0.tar.gz (4.5 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.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mobobot_client-0.0.0.tar.gz
  • Upload date:
  • Size: 4.5 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.0.tar.gz
Algorithm Hash digest
SHA256 dc42fc743a6fee54601aadb15df5b2dc63aa5ce8dace3aa8df5b33f7bfbbd8b3
MD5 71f1354ab0a051fea7a2e1597501d8ad
BLAKE2b-256 16b62bec1bd48d830e711965a321cc265c165545c724de31b9f7568496ebbb87

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mobobot_client-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35b17573ff5621fe40fb11e97e394f98d32fec4bb1a5bf8de5c17e2ac0507397
MD5 c3055be9da898321502628946d6c2d7c
BLAKE2b-256 ff4b9c38c2ecb4fa6693d14ebb12ade7bb385e2797dfde49f718570fbee16b11

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