I installed the supporting software for Blocos on a Macbook, but it
still isn't running. I get the following message:
IT482070-2:blocos teacher$ python Blocos.py
Traceback (most recent call last):
File "Blocos.py", line 37, in <module>
from gtk import glade
ImportError: No module named gtk
I had installed GTK2, so I went back and installed GTK1, but I get the
same message. Any ideas what I should try next? Any help would be
greatly appreciated. Below is a listing of the software installed with
Macports. I'm trying to get the software installed for a class that I'm
going to start teaching to gradeschool children using Blocos to teach
them how to program a robot.
Thanks!
Brett
IT482070-2:blocos teacher$ port installed
The following ports are currently installed:
atk @1.26.0_1 (active)
atlas @3.8.3_1 (active)
autoconf @2.65_0 (active)
automake @1.11.1_0 (active)
bzip2 @1.0.5_3+darwin (active)
cairo @1.8.8_0+macosx (active)
db46 @4.6.21_6 (active)
docbook-xml @5.0_0 (active)
docbook-xml-4.1.2 @4.1.2_1 (active)
docbook-xml-4.2 @4.2_0 (active)
docbook-xml-4.3 @4.3_0 (active)
docbook-xml-4.4 @4.4_0 (active)
docbook-xml-4.5 @4.5_0 (active)
docbook-xml-5.0 @5.0_0 (active)
docbook-xsl @1.75.2_0 (active)
expat @2.0.1_0 (active)
fftw-3 @3.2.2_0+i386 (active)
fontconfig @2.8.0_0+macosx (active)
freetype @2.3.11_1+macosx (active)
gcc43 @4.3.4_0 (active)
gdbm @1.8.3_2 (active)
getopt @1.1.4_1 (active)
gettext @0.17_4 (active)
glib2 @2.22.3_0+darwin (active)
gmp @4.3.1_1 (active)
gnome-common @2.26.0_0 (active)
gnome-doc-utils @0.16.1_1 (active)
gperf @3.0.4_0 (active)
groff @1.20.1_1 (active)
gtk-doc @1.13_0 (active)
gtk2 @2.18.6_0+x11 (active)
gzip @1.3.13_0 (active)
help2man @1.37.1_1 (active)
intltool @0.40.6_0 (active)
iso-codes @3.12.1_0 (active)
jasper @1.900.1_6 (active)
jpeg @7_0 (active)
kiwi @1.9.20_0 (active)
libffi @3.0.8_1 (active)
libglade2 @2.6.4_1 (active)
libiconv @1.13_0 (active)
libpixman @0.16.4_0 (active)
libpng @1.2.42_0 (active)
libtool @2.2.6b_0 (active)
libxml2 @2.7.6_0 (active)
libxslt @1.1.26_0 (active)
m4 @1.4.13_0 (active)
mpfr @2.4.2-p1_0 (active)
ncurses @5.7_0 (active)
ncursesw @5.7_0 (active)
openssl @0.9.8l_0+darwin (active)
p5-getopt-long @2.38_0 (active)
p5-locale-gettext @1.05_0 (active)
p5-pathtools @3.31_0 (active)
p5-scalar-list-utils @1.22_0 (active)
p5-xml-parser @2.36_0 (active)
pango @1.24.5_0+macosx (active)
perl5 @5.8.9_0 (active)
perl5.8 @5.8.9_3 (active)
pkgconfig @0.23_1 (active)
py25-cairo @1.8.2_0+darwin_9 (active)
py25-gobject @2.18.0_0+darwin_9 (active)
py25-gtk @2.16.0_0+darwin_9 (active)
py25-nose @0.11.1_0 (active)
py25-numeric @24.2_1+macosx (active)
py25-numpy @1.4.0_0 (active)
py25-setuptools @0.6c11_0 (active)
py26-cairo @1.8.8_0+darwin_9 (active)
py26-gobject @2.18.0_0 (active)
py26-gtk @2.16.0_0+darwin_9 (active)
py26-libxml2 @2.6.21_0 (active)
py26-nose @0.11.1_0 (active)
py26-numpy @1.4.0_0 (active)
py26-serial @2.4_0 (active)
py26-setuptools @0.6c11_0 (active)
python25 @2.5.4_9+darwin+darwin_9+macosx (active)
python26 @2.6.4_0+darwin (active)
rarian @0.8.1_0 (active)
readline @6.1.000_1+darwin (active)
shared-mime-info @0.70_0 (active)
sqlite3 @3.6.22_0 (active)
tcl @8.5.8_0+darwin (active)
tiff @3.9.2_2+macosx (active)
tk @8.5.8_0+darwin (active)
Xft2 @2.1.14_0 (active)
xmlcatmgr @2.2_1 (active)
xorg-bigreqsproto @1.1.0_0 (active)
xorg-compositeproto @0.4.1_0 (active)
xorg-damageproto @1.2.0_0 (active)
xorg-fixesproto @4.1.1_0 (active)
xorg-inputproto @2.0_0 (active)
xorg-kbproto @1.0.4_0 (active)
xorg-libX11 @1.3.2_0 (active)
xorg-libXau @1.0.5_0 (active)
xorg-libXcomposite @0.4.1_0 (active)
xorg-libXcursor @1.1.10_0 (active)
xorg-libXdamage @1.1.2_0 (active)
xorg-libXdmcp @1.0.3_0 (active)
xorg-libXext @1.1.1_0 (active)
xorg-libXfixes @4.0.4_0 (active)
xorg-libXi @1.3_0 (active)
xorg-libXinerama @1.1_0 (active)
xorg-libXrandr @1.3.0_1 (active)
xorg-libXScrnSaver @1.2.0_0 (active)
xorg-randrproto @1.3.1_0 (active)
xorg-renderproto @0.11_0 (active)
xorg-scrnsaverproto @1.2.0_0 (active)
xorg-util-macros @1.4.1_0 (active)
xorg-xcmiscproto @1.2.0_0 (active)
xorg-xextproto @7.1.1_0 (active)
xorg-xf86bigfontproto @1.2.0_0 (active)
xorg-xineramaproto @1.2_0 (active)
xorg-xproto @7.0.16_0 (active)
xorg-xtrans @1.2.5_0 (active)
xrender @0.9.5_0 (active)
zlib @1.2.3_3 (active)
IT482070-2:blocos teacher$
Thanks for the help!
Brett
I'm in the tedious process of installing to 5 additional computers.
When you list GTK as a needed library, which version should I be
downloading?
Thanks again for all of your help!
Brett
Do you have any ideas on how to determine which device file belongs to
the usb port?
I've got to go get some sleep...I'll check back in about 4 hours.
Thanks for your help!
Brett
Brett
I remembered that I had installed the Arduino programming environment on
my wife's old mac ibook, so I plugged the cable into it. Indeed, two
device files popped up into /dev:
cu.usbserial-FTDOML7H
tty.usbserial-FTDOML7H
Cool! That gives me something to work with. But then I thought, "What
would happen if I plugged in a different FTDI cable?" And so I did.
Again, two device files showed up in /dev:
cu.usbserial-FTERZVKB
tty.usbserial-FTERZVKB
Dang! Each cable seems to create a unique device file name probably
based upon it's usb serial number. Not a big deal if you are
working(playing) at home and are using 1 computer with 1 cable. But it
makes it much more awkward if you are teaching a weekly class with many
kids, several macbooks, and several cables.
--Is there any way to use a wildcard character in a link?(ie
tty.usbserial-*)
--What is the difference between the cu. and the tty. device files?
Which do I need to link to ttyACM0?
Brett
Brett
My problems with communicating through the usb port was a driver issue.
I went to the FTDI website, but their instructions were a bit involved.
With only 30 minutes left before class, I downloaded the Arduino install
package for OS X, and it included the FTDI drivers with an automatic
install...just a few clicks and a reboot and I was in business(I didn't
need to install Arduino, only the FTDI driver that was bundled with it).
I then created the symbolic link suggested by Lucas and I was in
business!(after doing the same to each of the 6 Macbooks) Since each
cable is identified by the operating system by a unique identifier, I
had to label each cable with the computer number so that they can be
paired up each time. If we get a lot more Babuino users of Blocos, it
might be worth including support for /dev/tty.usbserial-FT* for OS X
users with FTDI chips or cables.
Thanks for all of your help Lucas!
Brett
I would like to build a Gogo board so that I can play with the Monitor
program, but I don't want to mess with etching my own board or sending
it out to a PCB shop(which tends to be expensive unless you are order a
lot of boards). I would like to build it using a generic Radio Shack
project board, but several of the links on the Br-Gogo site are broken,
including the schematic for the 3.0 Gogo board.
So why am I interested in using the Blocos(and hopefully someday the
Monitor) software on the Arduino(Babuino platform rather than the Gogo
board? Several reasons:
** It's intimidating for the beginner programmer to have to etch their
own board or send files out to a pcb shop to have them made. Arduino is
a very popular open source software/hardware platform worlwide And their
are dozens of places to order boards with some as low as $10US. Or they
could do what I like to do and simply use a generic project board and do
your own layout.
** The Arduino boards are very popular. Lots of people already have
Arduino boards; all they have to do is download the Babuino hex file
into the chip using the bootloader that is already there and they are
ready to use Blocos or Cricket logo to program with or to teach their
kids how to program or to teach a community/school group how to program.
** The Arduino boards provide ready made open source programming
languages. Any grade school age child can learn to program using
Blocos. When their programming needs exceed that gui, they can use
Cricket logo with a text editor using the same commands they are already
familiar with, but with additional flexibility. When their programming
needs exceed Cricket logo, they can use The Arduino programming
environment with a C-like language. There are tons of libraries and
coding examples to choose from. And the software runs nicely on Macs,
Windows, and Linux systems. And if their programming needs exceed what
Arduino offers, they can program in straight C and use the same
bootloader that is on the chip already. Gradeschool through graduate
school all with open source software on the same platform...that's a lot
of flexibility.
Everywhere I've shown off the Babuino platform, people have been very
excited. Over the next several weeks I will be putting together
instructionals and tutorials on how to build robots with the Babuino,
how to program using Blocos & text based Logo, and some basics with
exploring electronics & using sensors. I think that once that
foundation is available, it will generated even more interest in the
Blocos and Logo language given the popularity of the Arduino platform.
A key element in the Arduino platform is the use of the FTDI chip to
allow programing and communications through the usb port. RS232 ports
are disappearing from the computer world, especially on laptops, and
pretty much any computer less than 12 years old has usb ports. I really
like the old rs232 serial ports for working with microcontrollers, but
they are disappearing. Most Arduino boards either have an FTDI chip
dierctly on the board or they are programmed with with an FTDI cable
that has the chip and its circuitry built into it.
Under linux, the FTDI chip seems to go along with whatever naming
convention the OS already uses for usb. On my Ubuntu machine,
it's /dev/ttyUSBx, where x is some single digit number. On OS X 10.3
and 10.5, the FTDI driver uses the naming
convention /dev/tty.usbserial-FTxxxxxx, where the x's are alphanumeric
digits A-Z,0-9(or at least this is what I've found with the 7 FTDI
cables I've tested so far). This gives over 2 billion possible usb port
names( (26+10)^6). Using symbolic links works, and that is what I did
using your instructions, but most Mac users probably aren't very
comfortable with using root privileges in a terminal window. Also, if
they are using boards with FTDI chip directly on them, they will have to
create a symbolic link for every single board they use with their Mac.
This is not very graceful and certainly not user friendly. As an
alternative, can blocos query the operating system for the /dev
filenames, and use any device whose name matches tty.usbserial-FT*?
Brett
>You want a Br-Gogo ? It's usb 2.0 and ready to use.Everything I've seen on the Br-Gogo website shows that the Br-Gogo board
is RS232 based. If you are using the usb port, how do you program the
board without some type of rs232 adapter such as the FTDI cable?
I would like to build a Gogo board so that I can play with the Monitor
program, but I don't want to mess with etching my own board or sending
it out to a PCB shop(which tends to be expensive unless you are order a
lot of boards). I would like to build it using a generic Radio Shack
project board, but several of the links on the Br-Gogo site are broken,
including the schematic for the 3.0 Gogo board.
So why am I interested in using the Blocos(and hopefully someday the
Monitor) software on the Arduino(Babuino platform rather than the Gogo
board? Several reasons:
** It's intimidating for the beginner programmer to have to etch their
own board or send files out to a pcb shop to have them made. Arduino is
a very popular open source software/hardware platform worlwide And their
are dozens of places to order boards with some as low as $10US. Or they
could do what I like to do and simply use a generic project board and do
your own layout.
** The Arduino boards are very popular. Lots of people already have
Arduino boards; all they have to do is download the Babuino hex file
into the chip using the bootloader that is already there and they are
ready to use Blocos or Cricket logo to program with or to teach their
kids how to program or to teach a community/school group how to program.
** The Arduino boards provide ready made open source programming
languages. Any grade school age child can learn to program using
Blocos. When their programming needs exceed that gui, they can use
Cricket logo with a text editor using the same commands they are already
familiar with, but with additional flexibility. When their programming
needs exceed Cricket logo, they can use The Arduino programming
environment with a C-like language. There are tons of libraries and
coding examples to choose from. And the software runs nicely on Macs,
Windows, and Linux systems. And if their programming needs exceed what
Arduino offers, they can program in straight C and use the same
bootloader that is on the chip already. Gradeschool through graduate
school all with open source software on the same platform...that's a lot
of flexibility.
Everywhere I've shown off the Babuino platform, people have been very
excited. Over the next several weeks I will be putting together
instructionals and tutorials on how to build robots with the Babuino,
how to program using Blocos & text based Logo, and some basics with
exploring electronics & using sensors. I think that once that
foundation is available, it will generated even more interest in the
Blocos and Logo language given the popularity of the Arduino platform.
A key element in the Arduino platform is the use of the FTDI chip to
allow programing and communications through the usb port. RS232 ports
are disappearing from the computer world, especially on laptops, and
pretty much any computer less than 12 years old has usb ports. I really
like the old rs232 serial ports for working with microcontrollers, but
they are disappearing. Most Arduino boards either have an FTDI chip
dierctly on the board or they are programmed with with an FTDI cable
that has the chip and its circuitry built into it.
Under linux, the FTDI chip seems to go along with whatever naming
convention the OS already uses for usb. On my Ubuntu machine,
it's /dev/ttyUSBx, where x is some single digit number. On OS X 10.3
and 10.5, the FTDI driver uses the naming
convention /dev/tty.usbserial-FTxxxxxx, where the x's are alphanumeric
digits A-Z,0-9(or at least this is what I've found with the 7 FTDI
cables I've tested so far). This gives over 2 billion possible usb port
names( (26+10)^6). Using symbolic links works, and that is what I did
using your instructions, but most Mac users probably aren't very
comfortable with using root privileges in a terminal window. Also, if
they are using boards with FTDI chip directly on them, they will have to
create a symbolic link for every single board they use with their Mac.
This is not very graceful and certainly not user friendly. As an
alternative, can blocos query the operating system for the /dev
filenames, and use any device whose name matches tty.usbserial-FT*?
I figured out the source of my confusion...I was looking at the Gogo
website, which uses a picf877 and shows no sign of a usb version.
Looking through your files on the Br-Gogo site on Sourceforge, I now see
your version of the Gogo board with usb support.
>
> Broken links? Can you send me these links? I have tested and works
> fine here.
The broken links were on the Gogo board website, not your Sourceforge
website. The main link that I was intersted in was for the schematic,
but I later found it bundled with the rest of the eagle files in a
different link.
> I don't know this Radio Shack project board. You can made a board at
> home, like this:
> http://www.riccibitti.com/pcb/pcb.htm
> or
> http://www.qsl.net/k5lxp/projects/PCBFab/PCBFab.html
> I developed the board with this in my mind.
Here's the link to the Radio Shack project board I use for a lot of my
projects:
http://www.radioshack.com/product/index.jsp?productId=2103800#
I have used these for years, and they are by far the handiest project
boards around.
For a person just starting out in electronics, etching their own board
is certainly possible, but does add a considerable hurdle. Personally,
I would rather not mess with the toxic chemicals involved, although with
the shift towards surface mount components, eventually I will be forced
to start etching boards.
>
> If don't be too expensive, I will send for one Br-gogo. What is your
> address?
This is very generous, but I assure you that I can afford pretty much
any programming platform I want to work with. However, if I'm going to
write instructions and tutorials for beginners to follow, I want the
platform to be as inexpensive as possible. Ordering custom pcb boards
from a pcb manufacturer is fine if you are ordering dozens of them for a
group; etching your own is fine if you are experienced, know someone who
can guide you, or have the determination practice until you get it
figured out; but what about the average kid working on his/her own just
starting out in electronics/programming? I think that they'd be much
better off if they could just spend $3 on a generic project board.
>
> Everywhere I've shown off the Babuino platform, people have
> been very
> excited. Over the next several weeks I will be putting
> together
> instructionals and tutorials on how to build robots with the
> Babuino,
> how to program using Blocos & text based Logo, and some basics
> with
> exploring electronics & using sensors. I think that once that
> foundation is available, it will generated even more interest
> in the
> Blocos and Logo language given the popularity of the Arduino
> platform.
>
> Very cool!! Can you send to me too this docs?
Most certainly! I'm mostly done with the instructions on how to build
the circuit board, then I'll write instructions on how to build the rest
of the robot, including modifying servo motors and building inexpensive
foam wheels. After that I will create a series of tutorials on
programming with Blocos. I will post all of this online and would love
to get help translating them into Portuguese and Spanish.
>
> The PIC18F4550 has a built-in USB module, so you don't need any
> special cable.
That is a very nice feature.
>
> This is not very graceful and certainly not user friendly. As
> an
> alternative, can blocos query the operating system for
> the /dev
> filenames, and use any device whose name matches
> tty.usbserial-FT*?
>
>
> Yes, We will do something like this on the next's months.
That would be great!
>
> I'm with new job, so I will take some time to respond.
Good luck with the new job!
>
I'm no expert at H-bridges, but I have looked at a number of designs and
have been wanting to develop an inexpensive one that is reasonably
efficient. What do you have in mind?
built into Br-gogo board? daughter board? standalone board?
what voltage range? what amperage range?
small, efficient surface mount components?
easy novice assembly with through-hole components?
Brett
Gotta go...be back in a few hours.
Brett
I don't have a schematic for my circuit...I didn't label a single thing
on the layout! I will have to look it over tomorrow to relearn how it
works. There's two jumpers on it, and as I recall they allow you to run
it with one pin turning it on (and through pwm controlling the power
output) and the other pin determining direction, while the other mode
allows the pwm to control both direction and power (0% duty cycle = full
reverse, 25% = half power reverse, 50% = no power output, 75% = half
power forward, 100% = full power forward). I based the circuit off of a
schematic that I found online. I'll look for it tomorrow.
Brett
http://www.bobblick.com/techref/projects/hbridge/hbridge.html
Brett