473,761 Members | 9,864 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Robotics and parallel ports

Basically, I'm thinking about building a robot which can be controlled by
programs which I write, I'm going to interface to the robot through the
parallel port (like in this tutorial here:
linuxfocus.org/English/May2001/article205.shtm l). However, I know that this
will probably need to be done in low level C. Now, although I can code in
C, I don't particularly want to :-) , instead I'd like to use Python. I'm
wondering, is there any way I can access the parallel port and the kernel
module parport using Python?

Many thanks.

Regards,

--
sleepingelimina tor
Dec 15 '05 #1
11 3857
Isaac T Alston wrote:
I'm wondering, is there any way I can access the parallel port and
the kernel module parport using Python?


A quick Google search for "parport python" turned up this:

http://bigasterisk.com/parallel

Maybe it's what you're looking for.

--- Heiko.
Dec 15 '05 #2
Isaac T Alston wrote:
I'm wondering, is there any way I can access the parallel port and
the kernel module parport using Python?


Or you might even give pyparallel a try:

http://pyserial.sourceforge.net/pyparallel.html

I've used that before to control a psychology experiment setup, and it works
just fine, under Linux and under Windows.

--- Heiko.
Dec 15 '05 #3
Heiko Wundram wrote:
Maybe it's what you're looking for.


Thanks for that. I've never actually built a robot or anything like that
before, so I'm welcome to any advice I can get! I've heard programming via
USB is hard, so that's why I'm using the parallel port (serial ports are
said to be slow when sending a lot of data (I think)). I think I'll start
off with something very simple, for example controlling a motor and then
move up to more advance models.

Thanks again.

Regards,

--
Isaac
Dec 15 '05 #4
Hi Isaac,

I've been meaning to get into robot building too. After much
consideration I decided to go the Lego Mindstorms route. I actually
figured it was a Pythonic way to go. "Pythonic" meaning finding
something that lets me do I want easily with minimal knowledge of the
system required. (I'm pretty sure it won't actually run Python)

I figure eventually I'll graduate to working on raw electronics like
you, but working with Mindstorms will let me figure out what I'm
interested in and determine what limitations it has.

I'll let you know how my approach goes. I'm figuring I'll get the
Mindstorms for Christmas .. otherwise I'll buy one soon after.

Do drop me an email sometime. I'm very interested to see how you
progress in your approach.

-Greg
On 12/15/05, Isaac T Alston <sl************ ****@gmail.com> wrote:
Heiko Wundram wrote:
Maybe it's what you're looking for.


Thanks for that. I've never actually built a robot or anything like that
before, so I'm welcome to any advice I can get! I've heard programming via
USB is hard, so that's why I'm using the parallel port (serial ports are
said to be slow when sending a lot of data (I think)). I think I'll start
off with something very simple, for example controlling a motor and then
move up to more advance models.

Thanks again.

Regards,

--
Isaac
--
http://mail.python.org/mailman/listinfo/python-list

--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
Dec 15 '05 #5

Isaac T Alston wrote:
Heiko Wundram wrote:
Maybe it's what you're looking for.
Thanks for that. I've never actually built a robot or anything like that
before, so I'm welcome to any advice I can get! I've heard programming via
USB is hard, so that's why I'm using the parallel port (serial ports are
said to be slow when sending a lot of data (I think)). I think I'll start
off with something very simple, for example controlling a motor


I did that using the Lego Mindstorm Robotics Kit:

<http://members.aol.com/rotanasnem/lego.htm>
and then move up to more advance models.
I never got past the

Turn the motor on
Halt

design.

Thanks again.

Regards,

--
Isaac


Dec 15 '05 #6
Isaac T Alston (sl************ ****@gmail.com) wrote:
: Heiko Wundram wrote:
: > Maybe it's what you're looking for.

: Thanks for that. I've never actually built a robot or anything like that
: before, so I'm welcome to any advice I can get! I've heard programming via
: USB is hard, so that's why I'm using the parallel port (serial ports are
: said to be slow when sending a lot of data (I think)). I think I'll start
: off with something very simple, for example controlling a motor and then
: move up to more advance models.

Greetings Isaac,

Go for it! Words of advice on using the parallel port:

1 - there are different modes (SPP, EPP etc.) availible - 'Parallel Port
Interfacing' on www.beyondlogic.org is an excellent starting point. The
mode is set in the PC BIOS, and if it's not set to the mode you're coding
for then you may spend hours being perplexed...

2 - If you're new to robotics etc. make sure you think carefully about
how you connect your motors to the parallel port to prevent hardware
getting blown... An old but good book that covers electronic (and
computer) control of motors is "The Robot Builder's Bonanza"

Seperatly: USB needn't be so hard... This little board of tricks
http://www.dlpdesign.com/usb/usb245.shtml gives you a parallel interface
from USB 1.1, and a C library on the PC (which can be accessed from
Python with ctypes) - data rate is similar to the parallel port, although
latency is much higher, which can kill performance of some applications.

Enjoy!
Dec 15 '05 #7
Isaac T Alston wrote:
I've never actually built a robot or anything like that
before, so I'm welcome to any advice I can get! I've heard programming via
USB is hard, so that's why I'm using the parallel port (serial ports are
said to be slow when sending a lot of data (I think)).


How much data do you plan to send? We build industrial control systems
and robotics for laboratories and use serial ports most of the time
without much concern for performance. Generally speaking you shouldn't
have to send lots of data, and only rare have to receive lots (e.g. if
you have a camera on-board).

The only time I'd consider a parallel port is in the very early stages
if I had no intelligence in the robot, and simply needed a few discrete
output signals to turn motors on and off. In a prototype, for example.
For anything real I would likely have on-board intelligence (embedded
Linux system maybe, or a microcontroller board) and in that case a
serial port is going to be much easier to work with than a parallel port.

-Peter

Dec 16 '05 #8
Thanks for everyone's tips and hints. I WILL MAKE THIS WORK! I think I'll
take your advice and use the serial port instead of the parallel port - I
won't have that much data to send (in comparison with, for example,
industrial level applications). As for on-board chips though, does this
require low level programming!? Or can I have an embedded python
interpreter for the chip?

Many thanks.

Regards,

--
Isaac
Dec 16 '05 #9
Hi,
Thank you for the info.
The dlp usb solution looks like a terrific gadget, especially since
parallel ports have almost disppeared, at least on portables.
In fact, would in linux not any py software capable of dealing with a
usb connection (almost) suffice? Any further comments would be much
appreciated.
malv

Dec 16 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1165
by: Diego Solis | last post by:
Hi people, I need to write a C# program which communicates with a thermal printer. After a search for the web I found that a way to comunicate with the ports is calling the kernel32.dll, which has some external methods (CreateFile, WriteFile, ReadFile, Get/Set CommSettings, Get / Set CommTimeOuts) to communicate with the port. My first problems with this dll is that I couldn't find the right
2
1131
by: SearedIce | last post by:
Where should I start in my search for information about how to do this? I have always wanted to learn and I think I finally have the initiative. Any C++ library files for doing this? Thank you very much for your time, John
11
3329
by: karan | last post by:
I would like to know how one can use the parallel port through c/c++.Also, how does one determine what port is installed(EPP/ECP/SSP/PS2)? What is the differnece between these? What are the current sinking/drawing capacities of these ports? If possible, please give examples in C/C++. Thanks I would be grateful if any ebooks/tutorials could be provided at karanmalhotra85@yahoo.com
3
1503
by: Dave | last post by:
Im just starting in vb6 and want to write a scanning program, but iam being flumoxed by the use of and access to parallel ports. Can anyone help? please Thanks Dave
11
5282
by: Timothy Smith | last post by:
hello people. i've been trying to send an 8 byte string to my parallel port under freebsd. the purpose is it to control a relay board. the board simply responds to the output byte coming from the port. eg. 00000001 will set pin 1 high and flick the relay open. todate i've attempted this with merely open() on /dev/ppi0 and numpy for the byte array, but i just can't seem to get it working. i know the parallel port works and i know the...
0
1019
by: Yungsid | last post by:
Hi I am currently involved in a project. It involves using a pc's parallel port to control a circuit. I was using c-sharp before but I got stuck using the hinstance lib. So if you could give me a help with java I'll be grateful.Thanks
1
3036
by: yanz | last post by:
Hi everyone. Hope you guys can help me. Attached below are VB6 codes for a hand phone to call to a modem. When the action is executed, a message box will pop out ‘Ring Ring’. I just want to know is there anyone out there have the codes for SMS where when the action is executed, a message box will pop out. On the other hand, I also need some simple codes (VB6) for 8 LEDs lights for parallel ports. Below is the coding for the calling with...
2
3960
by: joaquimfpinto | last post by:
Dear All, I made an app in c# that uses several serial ports. For the serial ports I use a pnp Sunix board, some with 8 serial ports other with 4 or even 2 serial ports. Whenever I use the development computer I don't have ay problem with my application.
4
15354
by: Soren | last post by:
Hi, I want to control some motors using the parallel port.. however, my laptop does not have any parallel ports (very few do). What I do have is a USB->Parallel converter... I thought about using PyParallel, but the USB->Parallel converter doesn't actually map to the LPT port .. and PyParallel only looks for LPT ports? Has anyone tried doing this? What are my options for controlling parallel connections on a laptop with no parallel...
0
10115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9957
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7332
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.