Skip to content

prashanta/wCK.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

#wCK.py

A python library to control wCK servo from RoboBuilder. This is an attempt to replicate functions of wCK Programmer, which is available only for Microsoft Windows (darn it!).

You will need pySerial library for this.

####Usage

Start python interpreter

$ python

Import servo

>>> from wck import servo

Create instance with serial port, baud rate and servo id

>>> a = servo("/dev/tty.SLAB_USBtoUART",115200,0)

Scan to determine Servo ID and Baudrate

>>> a.scan()

Send servo position command

>>> a.pos(4,102)

Read sevo position

>>> a.readPos()

Continuous run servo counter clockwise direction

>>> a.ccw(12)

Continuous run servo clockwise direction

>>> a.cw(12)

Stop servo

>>> a.cw(0)

Set new ID to servo

>>> a.setID(12)

Close serial port

>>> a.close()

####Resources

wCK User's Manual

wCK Programmer User's Manual

Understanding wCK module and C programming with RoboBuilder


The MIT License (MIT)

Copyright (C) 2013 Prashanta Shrestha

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Silly little Python class for RoboBuilder's wCK servomotors.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages