BeagleBone Black (BBB)

by wacker on Sat 21 September 2013 // Posted in legacy // under

Today was Software Freedom Day and there was a lot of amazing talks and hacking going on! The project that I began with a fellow hacker and friend, Suzanne Reed, was a bot that will be used for dispensing beverages via SMS message to a BBB connected to some motors. I do not know much about the mechanical process, but I know I will be writing most of the software portion.

Our goal for today was to try and get some sort of response from a motor that we hocked up to the BBB via basic motor controls using some simple python code, but were unsuccessful. That's not to say that our entire day was unsuccessful because it sure wasn't. I personally had no experience prior with a BBB or anything similar like a Raspberry Pi. Regardless of my background with this kind of software, I was able to successfully ssh into the BBB and install some packages that are required to even being testing the motors required to dispense the beverages.

After a long period of searching how to simply ssh into the BBB, I had found the answer! Assuming you already have the BBB plugged into your laptop or desktop, you can ssh into the BBB by typing this command:

ssh root@beaglebone.local

You will then be prompted for a password, but you might ask, "How is there already a password?" Funny thing, there isn't. You can simply bypass this by hitting the enter key. You have now successfully ssh-ed into your BBB!

From here we installed some dependency packages that we needed to run the code to control the motor. These commands include:

su

opkg update

opkg install python python-modules python-pyserial python-numpy python- setuptools python-misc python-pip python-distutils git

git clone git://github.com/adafruit/adafruit-beaglebone-io-python.git

/usr/bin/ntpdate -b -s -u pool.ntp.org

cd adafruit-beaglebone-io-python

python setup.py install

git clone git://github.com/petebachant/bb_pystepper.git

cd bb_pystepper

Now that you have installed the correct packages and are in the bb_pystepper directory, it is time to begin testing some code! You can run a simple test by entering these commands:

python

>>> from bb_pystepper import Stepper

>>> mystepper = Stepper()

>>> mystepper.rotate(180, 10)

>>> mystepper.angle

0.0

This just shows that the stepper was properly loaded and adjusts the angle of the motor properly as well. This was just step one to get our bot up and running and there will be more posts later on as our progress continues!