[EuroPython] pyhton question- distribution
sparks.m at gmail.com
Thu Apr 22 17:42:21 CEST 2010
On Thu, Apr 22, 2010 at 12:18 PM, Bill Jordan <billjordan121 at yahoo.com> wrote:
> Hey everbody,
> If we have 100 apples, for example, and we need to distrubte the 100 apples
> randomly in 10 boxes, how can we do this in python?
Well, first you'd need to build a robot that you could control using
python. If you wanted to do that yourself, a place to get components
and parts would be the MUTR website - http://www.mutr.co.uk . Then
you'd want to be able to interface from python to the robot. For that
you could either use an arduino, controlled over the serial port
(using pyserial), or using a velleman k8055 board, and the python
bindings for that. (the latter is more direct, the former has more
tools - both are fun IME).
Finally in order to pick up and grab the apples you'd need a webcam
and image analysis code, which would imply that you'd want to play
around with the python bings for Open CV, and co-ordinate the results.
Actually choosing which apples go in which boxes would be pretty
simple then, of the level of a homework problem ;-)
All of that's eminently doable, and would probably make a neat talk.
(BTW, the europython list is the place for discussing europython
related stuff, and building robots and given talks about python
powered robots would probably be on topic for that, but asking
homework questions - if this is one - probably isn't ;-)
More information about the EuroPython