Help. I loved the build, got it done while “watching” the superbowl on tv, but now I’m stuck on the software part.
I’ve been reading the forum posts and getting a better understanding but I’m still stuck with an unresponsive hexy.
I’ve come to understand that when you say “$ cd pomoco”, that means to open a terminal window and type cd Pomoco
at the prompt, but that wasn’t clear in the instructions at all. Now I’m confused about things that you do once and things
that you do everytime you want to program the hexy. So do I have to load the SERVOTOR32_v2.0
everytime I use hexy? how about
"sudo easy_install pyserial"? do I have to do this everytime. Then I’m having trouble with the cd pomoco command and the
"python PoMoCo.py" command in terminal. I’m not sure if I’m doing it right but I get the V response on adrino but the other commands
don’t work right, “C” centers one servo. I can give better error codes if that will help. The main thing is I can’t get the gui to load at all.
I want my hexy to live!
help him.
-gravy
I’m not a MacOS user but I’ve been using Unix (and Linux) forever (under the covers, MacOS is mostly Unix) so maybe this will help:
The “cd pomoco” means “Change Directory (folder) to ‘pomoco’” (To find out which directory you’re in, enter “pwd” (print working directory)).
You should only need to load the servotor32 once, unless you overwrite it with something else (or you want to update to a new version). It lives in the servotor32’s memory (like any other Arduino sketch, if you’re familiar with that).
Ditto the “sudo easy_install pyserial”, which installs the pyserial libraries. You would only need to do that again if you upgrade pyserial (or perhaps, if you upgrade your OS, depending on how the Mac handles that).
The “python PoMoCo.py” command is telling the OS to “run the program ‘python’ and pass it the file ‘PoMoCo.py’”. The program ‘python’ then figures out that it’s a Python program and interprets (runs) it. The catch here is if ‘python’ isn’t in your PATH, the OS won’t know where to find that program (and here we’re getting into Unix arcania). If you’re in a directory (folder) where the python executable is, try “./python PoMoCo.py” (the dot tells it to look in the current directory). On Unix/Linux you could try “/usr/bin/python PoMoCo.py” but MacOS uses a somewhat different directory structure.
Hope this helps!
- Al
Error codes…
Clicking PoMoCo.py yields
Last login: Thu Feb 7 18:20:36 on ttys002
cd ‘/Applications/PoMoCo-1.0/’ && ‘/usr/local/bin/pythonw’ ‘/Applications/PoMoCo-1.0/PoMoCo.py’ && echo Exit status: $? && exit 1
[xxxxxxs-powerbook-g4:~] gravy% cd ‘/Applications/PoMoCo-1.0/’ && ‘/usr/local/bin/pythonw’ ‘/Applications/PoMoCo-1.0/PoMoCo.py’ && echo Exit status: $? && exit 1
Traceback (most recent call last):
File “/Applications/PoMoCo-1.0/PoMoCo.py”, line 9, in
import servotorComm
File “PoMoCo/servotorComm.py”, line 3, in
import serial
ImportError: No module named serial
and
sudo easy_install pyserial
Password:
Searching for pyserial
Best match: pyserial 2.6
Processing pyserial-2.6-py2.6.egg
pyserial 2.6 is already the active version in easy-install.pth
Installing miniterm.py script to /usr/local/bin
and this one
Using /Library/Python/2.6/site-packages/pyserial-2.6-py2.6.egg
Processing dependencies for pyserial
Finished processing dependencies for pyserial
[xxxxxs-powerbook-g4:/Applications/PoMoCo-1.0] gravy%python PoMoCo.py
Traceback (most recent call last):
File “PoMoCo.py”, line 9, in
import servotorComm
File “PoMoCo/servotorComm.py”, line 3, in
import serial
ImportError: No module named serial
Thanks for any and all suggestions.
gravy
You don’t want to click PoMoCo.py
Since you have placed the PoMoCo-1.0 folder in Applications, you should try the following:
-
Double-Click Terminal (Look in /Application/Utilities)
-
Type:
cd /Applications/PoMoCo-1.0/, then press ‘return’ -
Type:
python PoMoCo.py, and press ‘return’
Copy and paste the results of just these 3 steps here, and I’ll try to get you going in the right direction.
Ok so I used terminal and typed what you said,
Here is the response:
Last login: Thu Feb 7 20:14:58 on ttys002
[xxxxs-powerbook-g4:~] gravy% cd /Applications/PoMoCo-1.0/
[xxxxs-powerbook-g4:/Applications/PoMoCo-1.0] gravy% python PoMoCo.py
Traceback (most recent call last):
File “PoMoCo.py”, line 9, in
import servotorComm
File “PoMoCo/servotorComm.py”, line 3, in
import serial
ImportError: No module named serial
[xxxxs-powerbook-g4:/Applications/PoMoCo-1.0] gravy%
I also took out the Bluetooth module to concentrate on getting PoMoCo running properly.
Ok, for some reason your Mac can’t find PySerial. Let’s try to fix that.
[ul]
[li] Double-Click Terminal (Look in /Application/Utilities)[/li]
[li] Type: sudo easy_install pyserial[/li]
[li] Post the output here, and we’ll see where you are[/li][/ul]
When I run this command on my Mac I get:
If you get the same thing, go ahead and try to run PoMoCo (using the instructions from my last message).
First here’s what sudo easy_install does:
Last login: Fri Feb 8 13:47:26 on ttys002
[xxxxs-powerbook-g4:~] gravy% sudo easy_install pyserial
Password:
Searching for pyserial
Best match: pyserial 2.6
Processing pyserial-2.6-py2.6.egg
pyserial 2.6 is already the active version in easy-install.pth
Installing miniterm.py script to /usr/local/bin
Using /Library/Python/2.6/site-packages/pyserial-2.6-py2.6.egg
Processing dependencies for pyserial
Finished processing dependencies for pyserial
[xxxxs-powerbook-g4:~] gravy%
Next I typed:
cd /Applications/PoMoCo-1.0/
[xxxxs-powerbook-g4:/Applications/PoMoCo-1.0] gravy%
Then:python PoMoCo.py
Traceback (most recent call last):
File “PoMoCo.py”, line 9, in
import servotorComm
File “PoMoCo/servotorComm.py”, line 3, in
import serial
ImportError: No module named serial
[xxxxs-powerbook-g4:/Applications/PoMoCo-1.0] gravy%
Still no gui
What am I doing wrong?
Thanks for your feed back.
gravy
Forget the directions below, and see the next post.
[quote]Hmm, curiouser and curiouser.
Please open terminal, and type the following:
You need to be exact and include the quotes.
It should spew a couple of lines of output, please cut and paste those here.[/quote]
Ah, I just noticed a couple of things.
You appear to be running a Powerbook G4, which means you’re using an older version of OS X.
It also appears that you’re using Python 2.6, I believe PoMoCo is going to need 2.7.
You can download an installer for Python 2.7.3 (for OS X 10.3-10.6) here:
http://www.python.org/ftp/python/2.7.3/python-2.7.3-macosx10.3.dmg
This file is a standard Mac .dmg file, and installer.
Install this, then try installing pyserial and running PoMoCo again.
Really thanks alot for your help, I don’t always post much of a message cause
sometimes I get logged off before I get it out but here it goes:
Last login: Sat Feb 9 13:27:10 on ttys000
[xxxxs-powerbook-g4:~] gravy% sudo easy_install pyserial
Password:
Searching for pyserial
Best match: pyserial 2.6
Processing pyserial-2.6-py2.6.egg
pyserial 2.6 is already the active version in easy-install.pth
Installing miniterm.py script to /usr/local/bin
Using /Library/Python/2.6/site-packages/pyserial-2.6-py2.6.egg
Processing dependencies for pyserial
Finished processing dependencies for pyserial
[xxxxs-powerbook-g4:~] gravy% cd PoMoCo
PoMoCo: No such file or directory.
[xxxxs-powerbook-g4:~] gravy% cd /Applications/PoMoCo-1.0/
[xxxxs-powerbook-g4:/Applications/PoMoCo-1.0] gravy% python PoMoCo.py
Traceback (most recent call last):
File “PoMoCo.py”, line 9, in
import servotorComm
File “PoMoCo/servotorComm.py”, line 3, in
import serial
ImportError: No module named serial
[xxxxs-powerbook-g4:/Applications/PoMoCo-1.0] gravy%
No module named serial…
I tried to specify pyserial 2.7.3 but got further errors
sudo easy_install pyserial 2.7.3
Searching for pyserial
Best match: pyserial 2.6
Processing pyserial-2.6-py2.6.egg
pyserial 2.6 is already the active version in easy-install.pth
Installing miniterm.py script to /usr/local/bin
Using /Library/Python/2.6/site-packages/pyserial-2.6-py2.6.egg
Processing dependencies for pyserial
Finished processing dependencies for pyserial
Searching for 2.7.3
Reading pypi.python.org/simple/2.7.3/
Couldn’t find index page for ‘2.7.3’ (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading pypi.python.org/simple/
No local packages or download links found for 2.7.3
error: Could not find suitable distribution for Requirement.parse(‘2.7.3’)
[xxxxs-powerbook-g4:/Applications/PoMoCo-1.0] gravy%
Do I need to uninstall or throw out anything.
not sure its using the specified version of python
I also downloaded and installed the tcl/tk 8.5.13 that they suggest for my model but I’m not sure if I needed 32bit instead of 64?
I think I got it, downloaded alternate tcl/tk and pyserial.
Anyway there is now a program called wish in my utilities folder.
opened that instead of terminal and typed in, well everything,
and got to the gui, now I think half my hexy is wired backwards.
I’ll post further success when I go through rewiring