Skip to main content

Getting Up and Running with OpenMoco Slim

While the Timelapse Engine provides all the functionality needed to perform the motion control for your time-lapse video, you'll still need a way to interface with the engine. The engine can communicate with any computer that has a USB port, so we'll just need some software to tell it what to do. OpenMoco Slim is the first, and most basic interface to the time-lapse engine. It's a simple application that provides a low-profile way to interact with the engine and script complex sequences of motion in Windows, Linux, and OSX.

We'll cover how to get Slim up and running, and walk through the basics of using it.

OpenMoco Slim

Slim is a simple, script-oriented interface to the engine.  Written in perl, it's natively cross-platform and easy to modify.  It is designed to provide a no-frills, simple interface for controlling the engine and scripting time-lapse sequences. You can use it to issue one command at a time, or script out sequences and settings to quickly re-play a desired sequence automatically.

This article assumes that you've already successfully installed, compiled, and uploaded the Timelapse Engine to your Arduino.

Install

You'll need the following to install Slim and get it running:

  • Perl 5.8
  • The OpenMoco Timelapse Perl API

Linux

Installing on Ubuntu, Debian and similar distributions that use the apt package manager is a breeze.

To follow these instructions, you'll also need the wget package, if you don't have it installed, do an `apt-get install wget` before beginning.

In a terminal window, type the following commands to install the SerialPort module, and all of the necessary packages

Installing Device::SerialPort

If you don't already have the Device::SerialPort perl module installed, you'll need to install it before installing the TimeLapse engine API:

sudo apt-get update
sudo apt-get install libdevice-serialport-perl

Now, we'll install the TimeLapse perl API and the Slim interface.

mkdir ~/openmoco
cd ~/openmoco
wget 'http://www.openmoco.org/downloads/Perl-OpenMoco-Interface-TimeLapse-0.02.zip'
unzip Perl-OpenMoco-Interface-TimeLapse-0.02.zip
cd 0.02
perl Makefile.PL
sudo make install
cd ..
wget 'http://www.openmoco.org/downloads/openmoco-slim-0.11.zip'
unzip openmoco-slim-0.11.zip
cd openmoco-slim
perl openmoco-slim.pl

That's it - you should now be at the Slim prompt.

Apple OSX

Installation on OSX is quite easy as well, OSX ships with perl installed by default. The instructions below assume that you're using the `fink' package manager, but if you're using `ports', just replace `fink' with `ports'.

Use the following commands in a terminal.

Installing Device::SerialPort

If you don't already have Device::SerialPort installed, you can install it easily by typing the following commands:

sudo fink install device-serialport

Now we'll install the TimeLapse perl API and Slim.

mkdir ~/openmoco
cd ~/openmoco
wget 'http://www.openmoco.org/downloads/Perl-OpenMoco-Interface-TimeLapse-0.02.zip'
unzip Perl-OpenMoco-Interface-TimeLapse-0.02.zip
cd 0.02
perl Makefile.PL
sudo make install
cd ..
wget 'http://www.openmoco.org/downloads/openmoco-slim-0.11.zip'
unzip openmoco-slim-0.11.zip
cd openmoco-slim
perl openmoco-slim.pl

Windows

For Windows, the installation is a little more complex, as you'll have to first install perl. There are several ways to do so, but this one will assume you're going to use ActivePerl and install it before you begin.

You will also need to download and install nmake from Microsoft. (Hint: download the linked file, and then run it to install nmake.)

Installing Win32::SerialPort for Activeperl

The first thing that you'll need to do is open up the perl package manager included with Activeperl. The Win32::SerialPort module does not come with the standard installation, and doesn't come from Activestate, so we'll need to add a new repository to get the package.

Go to Edit->Preferences, and then choose the 'Repositories' tab. Add the location "http://www.bribes.org/perl/ppm/" (without quotes) as a repository.

After PPM updates the database, scroll down to Win32-SerialPort, right click and then select 'install...' Now, press the green arrow at the top right of the screen to download and install the package.

Now we're ready to install the TimeLapse perl API and slim.

To install the TimeLapse API, first download OpenMoco-Interface-TimeLapse-0.02.zip

Save the file, and un-zip it.

Open up a command prompt (Start->run->cmd.exe), and change directories to where you unzipped the TimeLapse API package.

Type the following commands:

perl Makefile.PL
nmake install

You now have the perl API installed, and we can install Slim. First, download Slim, save the file and un-zip it.

You can then either run `perl openmoco-slim.pl' from the command line (from within the Slim directory) or double-click on the icon using windows file explorer.

Slim Workflow

While Slim doesn't provide much in the way of a user interface, it does expose every API command available, and lets you script your activities.

There are two ways to use Slim: in interactive mode and in script mode. To run Slim interactively, just run the script and you'll be presented with a prompt. At the prompt you can enter any command you like, or load a script from disk. In scripting mode, openmoco-slim is given a single argument that is the name of the script you want to run. Slim will exit after executing the script completely. There are several example scripts provided in the example directory.

Scripting allows you to set up commands in advance and run them repeatably whenever you like. Nearly any command can be run from a script, and certain commands like sleep and echo are provided to make scripting more useful.

Whether you're running a script or entering commands manually, the workflow is unchanged:

  1. Enter your Serial Port
  2. Connect to the engine
  3. Set parameters
  4. Start program or issue commands

The following commands illustrate this workflow:

[1] > port COM7
[2] > connect
[3] > set_camera exposure 500
[4] > set_camera cycle 10
[5] > set_camera on
[6] > start

At any time, you can type `help' to get a list of commands, and `help ' for help with a particular command.

Interacting With the Engine

It's important to understand that the interaction between you and the engine is live. It is either running (start), paused (pause), or stopped (stop). While the engine is running, it constantly checks to see if it should be doing anything. When some actions occur, they trigger other actions.

Exposing the camera causes motors to move.

After a camera shot has fired, and any required delays (such as camera post delay) have passed, each motor axis that is currently enabled moves a defined distance. The motors will not move unless they are enabled, and the camera is enabled and taking shots. You can, however, move the motors manually using the `move' command.

You can change any parameter at any time while the program is running, and it will take effect at the next available opportunity. For example, if you change the exposure length while the camera is currently exposing, the next exposure will be the length you specify. This allows you to make adjustments to your video while the engine is running and without having to stop the program or lose any settings.

Keyframes allow you take actions when a condition is met.

After the camera fires, any camera keyframes are also checked. This is also true for after motors move (motor keyframes), and as time elapses (time keyframes). As these events occur, all keyframe values are checked - so you can set keyframes on things like 100 shots having been taken, 3,000 steps taken by a given motor, or 20 seconds having passed. If any keyframe value is matched, the action indicated by that keyframe is executed.

While you only have eight keyframes of each type (camera, motor, and time) available, they are removed as they are matched. After executing the action associated with a keyframe, the keyframe is removed. They are removed for two reasons - one is to free the slot up for another keyframe, and the second is to allow us to execute keyframes if they are matched or exceeded. This allows us to set keyframes in the past and have them execute at the next available opportunity.

You can set as many keyframes for the same point as you have slots available. That means you can have up to eight different actions triggered at the same point in time, or same camera shot, or same distance for a motor.

An example of creating a keyframe:

[7] > keyframe camera 5 500 1

Or, create a keyframe at position 5 for the camera, activated at 500 shots, executing action 1.

Actions let you change settings and trigger events

You can store up to eight actions, and each action can be called from any keyframe (you can assign it to multiple keyframes if you like.). An action can change parameters for a motor, start a downward linear ramp in speed, alter the camera settings, or stop the program. They let you synchronize changes in the output video between different elements, or program complex moves.

An example of creating an action:

[8] > action 1 motor enable 0 1

Or, set action 1 to `enable motor #0 going in a positive direction'.

Use `help' to see what other commands are available.

Just think Cheap Coach

Just think Cheap Coach Handbags for a few seconds, have you already seen a lady who has not a handbag, in Coach Factory which she announced with a difference? For Coach Purses Outlet, the most famous brand of handbags is "Coach Outlet Online". And this Coach Outlet Store Online can a great gift for a woman. Excellent and exquisite Coach Outlet Online and Purses for over 60 years make you feel like a queen with their elaborate design and rich fabric. If your eyesight Coach Outlet Online is b enough, Coach Outlet can be quickly in your hearts and eyes. Louis vuitton purses are made from high quality materials and high-skilled workers who are proud of what they are prepared produce. And Coach Outlet is a great gift because there are many different styles that could be coordinated with different personalities together. Cheap Coach Purses are of high quality and aesthetic design. Yes, brand Coach Factory Outlet name handbags are extremely attractive; and as time goes by Coach Handbags Outlet, your investments might shed their authentic charm Coach Outlet Canada. Shopping for designer Coach Purses from our Coach Outlet
can be a very nice experience. Coach Shoulder Bags are all about style.
Each Coach Bag speaks of class and no matter where and when you carry
it, you are sure to get a few impressive looks your way Coach Outlet Online. When you have desired to expand your social life then it's important to take support of your louis vuitton handbags, From http://www.coachoutletonlinepurse.org/ which can change your style and are the most popular on the market. Coach Factory Outlet is made of unparalleled quality and look beautiful and functional.

designs and styles are impressing

For motorcyclist dudes, oakley sunglasses outlet the Oakley X-Squared oakley Sunglasses would be the perfect fit. This is one of the M Frames that offer great protection for your eyes and do not have a blind spot. oakley frogskin sunglasses Not only does it look cool, it is instilled with Unobtanium components to improve the oakley sunglases sale grip when you sweat and construct a three-point fit for precise optical potential. But watch out, Discount Oakley Sunglasses because the Oakley's Gascan Sunglasses offers its best yet! Its polarized lenses are made with such uncompromising standards Oakley Sunglasses For Sale that they were named favorites among the Navy SEALs. Although originally created for world-class athletes only, Oakley Split Jacket Sunglasses it is now available in the mass market. Better still, you can order it for prescription-based! Oakley Sunglasses UK For anyone who rides on the dangerous lines, you'd definitely want these oakley sunglasses cheap as the Oakley Fast Jacket Sunglasses ultimate companion. But if that doesn't match your taste, Oakley Wire Sunglasses you can check out the Oakley Radar Path. Yet another invention with the athletes in mind, this Oakley pair has a Custom Oakley Sunglasses hydrophobic lens coating which repels water, dust, and skin oils off the lenses. There are also vents at the side of Oakley Sunglasses For Women the glasses for extra cooling. The earpiece, like the Oakley X-Squared, is also made from Unobtanium components to increase Oakley Frogskin Sunglasses grip when sweaty or wet. The clarity you get from the lenses is excellent and would serve well for cyclists, runners and the like. Buy Oakley Sunglasses It is slightly pricey, but for the quality and satisfaction (which you are guaranteed to get), it will be worth every penny. Many a time, Oakley sunglass Outlet we find ourselves wanting something so badly but not able to attain it due to its heavy tag price. Well, no worries here. Cheap Oakley Sunglasses As said before, there is a pair of Oakley's for everyone. For an affordable yet cool and modish pair for prescription Oakley Sport Sunglasses , take a look at Oakley Hijinx Sport Wrap Sunglasses. Don't be fooled by its name ' this is actually great pair to be used as everyday shades. gucci outlet The Hijinx Sport Wrap fits the face comfortably and its Plutonite lenses ensure absolute UV protection for your eyes. gucci outlet online It is the kind of sunglasses that looks good on the shelf and makes you even look better when you put them on. gucci sale You can also opt to convert it to prescription sunglasses and it won't be any less good. cheap gucci bagsgucci bagscheap gucciguccicheap oakley sunglasses

What se Borsa Gucci Replica

What se Borsa Gucci Replica lo Gucci Outlet rendono possibile per voi per permettersi un aspetto elegante,stile di vita di una principessa.Gucci Sito Ufficiale Replica Conservare Online!Le sono perfetti l'ultimo accessorio per ogni vestito.Borse Gucci Se siete stati a morire proprio quella borsetta di lusso o in borsa progettista,Scegli aspetto moderno replica per un assaggio,un'esperienza,un lifestyle.Gucci Borse ora è possibile trovare offerte incredibili sugli accessori  di marca Gucci Borse Outlet a prezzi scontati fino al 70% al dettaglio.

Iconic le créateur de

Iconic le créateur de Louboutin Homme traite son prodigieux succès remporté par ses semelles rouges signature avec magnanimité impressionnante.Christian Louboutin Mais le designer fran?ais a vu rouge,lorsque le géant Yves Saint Laurent aurait posé le pied sur la pointe des pieds par le déploiement de son propre ensemble de rouge à fond les talons.
Gucci a leurs rubans rouges et verts, et je ne prendrais pas ce ruban et de le mettre dans mes Louboutin Femme. Pourquoi? Parce que j'ai un certain respect ", a déclaré Chaussures Louboutin, dont les réalisations ont porté sur les talons de Hollywood A-Listers y compris Blake Lively, Sarah Jessica Parker et Scarlett Johannsson.

Gucci Gucci Bags Outlet is

Gucci Gucci Bags Outlet is the biggest-selling Italian brand.Will the Gucci Bags 2012 hobo be making a comeback for spring? If Gucci has anything to say about it, the answer is “yes.” Gucci Men AND Ladylike satchels and small crossbody bags have been the currency of the accessories industry for the past several seasons, so much so that Gucci Spring 2012's Gucci Sunglasses 2012 stable of chain-strapped hobos was more than a little surprising to see.Brand New Gucci Shoes Sale!2011 Style gucci outlet,60% OFF.

Can't find device-serialport

Ok after getting my arduino running I started on installing slim. I am working on a MacBook Pro, Intel, OSX.5.8. Installed Fink no issues but when I tried to run the install script for device-serialport I get this "Failed: no package found for specification 'device-serialport'!"

Where do I find "device-serialport"?

Thanks

OK I installed Macports and

OK I installed Macports and that got me through the install for device-serialport. Now I am hung up on downloading and installing the Slim and the API. I put this in terminal

mkdir ~/openmoco
cd ~/openmoco
wget 'http://www.openmoco.org/downloads/Perl-OpenMoco-Interface-TimeLapse-0.03.zip'
unzip Perl-OpenMoco-Interface-TimeLapse-0.03.zip
cd Perl-API-TimeLapse-0.03/
perl Makefile.PL
sudo make install
cd ~/openmoco
wget 'http://www.openmoco.org/downloads/openmoco-slim-0.12.zip'
unzip openmoco-slim-0.12.zip
cd openmoco-slim
perl openmoco-slim.pl

I end up with this

robert-c-fishers-macbook-pro-3:~ rcfisher$ mkdir ~/openmoco
mkdir: /Users/rcfisher/openmoco: File exists
robert-c-fishers-macbook-pro-3:~ rcfisher$ cd ~/openmoco
robert-c-fishers-macbook-pro-3:openmoco rcfisher$ wget 'http://www.openmoco.org/downloads/Perl-OpenMoco-Interface-TimeLapse-0.03.zip'
-bash: wget: command not found
robert-c-fishers-macbook-pro-3:openmoco rcfisher$ unzip Perl-OpenMoco-Interface-TimeLapse-0.03.zip
unzip:  cannot find or open Perl-OpenMoco-Interface-TimeLapse-0.03.zip, Perl-OpenMoco-Interface-TimeLapse-0.03.zip.zip or Perl-OpenMoco-Interface-TimeLapse-0.03.zip.ZIP.
robert-c-fishers-macbook-pro-3:openmoco rcfisher$ cd Perl-API-TimeLapse-0.03/
-bash: cd: Perl-API-TimeLapse-0.03/: No such file or directory
robert-c-fishers-macbook-pro-3:openmoco rcfisher$ perl Makefile.PL
Can't open perl script "Makefile.PL": No such file or directory
robert-c-fishers-macbook-pro-3:openmoco rcfisher$ sudo make install
Password:
make: *** No rule to make target `install'
.  Stop.

the only thing I can think of is the folders are not in the right directory. Right now they are on the desktop but the script won't even download the files.

Thanks

Well . . . The only thing I

Well . . .
The only thing I could think of is that since files downloaded off the internet always go to the downloads file. so I just bypassed that art of the script and downloaded the files manually then put them into the openmoco folder in my users act "~/openmoco" then discarded a fews lines of the script and ended up with this . . .

 cd ~/openmoco
cd Perl-API-TimeLapse-0.03/
perl Makefile.PL
sudo make install
cd ~/openmoco
cd openmoco-slim
perl openmoco-slim.pl

I guess I could have changed the filepath to ~/downloads/ . . .
The short version I used above worked and it looks like it installed all the bits.

robert-c-fishers-macbook-pro-3:~ rcfisher$ cd ~/openmoco
robert-c-fishers-macbook-pro-3:openmoco rcfisher$ cd Perl-API-TimeLapse-0.03/
robert-c-fishers-macbook-pro-3:Perl-API-TimeLapse-0.03 rcfisher$ perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for OpenMoco::Interface::TimeLapse
robert-c-fishers-macbook-pro-3:Perl-API-TimeLapse-0.03 rcfisher$ sudo make install
Password:
cp lib/OpenMoco/Interface/TimeLapse.pm blib/lib/OpenMoco/Interface/TimeLapse.pm
Manifying blib/man3/OpenMoco::Interface::TimeLapse.3pm
Installing /opt/local/lib/perl5/site_perl/5.8.9/OpenMoco/Interface/TimeLapse.pm
Installing /opt/local/share/man/man3/OpenMoco::Interface::TimeLapse.3pm
Writing /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/auto/OpenMoco/Interface/TimeLapse/.packlist
Appending installation info to /opt/local/lib/perl5/5.8.9/darwin-2level/perllocal.pod
robert-c-fishers-macbook-pro-3:Perl-API-TimeLapse-0.03 rcfisher$

Now on to figuring out how to use the script.
If anyone has any other ideas please let me know. I have just groped my way through this. There has got to be a more elegant way.

Thanks

robert-c-fishers-macbook-pro-

robert-c-fishers-macbook-pro-3:openmoco rcfisher$ wget 'http://www.openmoco.org/downloads/Perl-OpenMoco-Interface-TimeLapse-0.03.zip'
-bash: wget: command not found

Looks like you need to install wget, see here: http://wget.darwinports.com/

It can't install them b/c they weren't downloaded (that's what wget does -- it gets something via HTTP).

!c

Thanks Church. I just tried

Thanks Church.
I just tried to download wget but the site with Darwinports, the application, seems to be down. I'll try again later. but at least I think slim is installed now to figure out how it works.

Thanks

I got wget from Macdowloads,

I got wget from Macdowloads, and installed. Next I tried to open slim but it just opened in textwrangeler. Does anyone know how to get it to open and run. I tried to point it to perl to open but I can't find a specific app to point to.

Thanks

Help Getting Slim Running on Your Mac

Panascape's picture

RCFisher,

I think I can help you get Slim up and running on your Mac. I have it running and driving my Arduino. E-mail me and we can set up a time to speak on the phone and I can talk you through my steps. eval(unescape('%64%6f%63%75%6d%65%6e%74%2e%77%72%69%74%65%28%27%3c%61%20%68%72%65%66%3d%22%6d%61%69%6c%74%6f%3a%64%61%76%69%64%67%61%72%64%65%6e%40%65%61%72%74%68%6c%69%6e%6b%2e%6e%65%74%22%3e%64%61%76%69%64%67%61%72%64%65%6e%40%65%61%72%74%68%6c%69%6e%6b%2e%6e%65%74%3c%2f%61%3e%27%29%3b')) I am in Santa Monica and can help you tomorrow.

David Garden

In your shell, go into the

In your shell, go into the directory where it's installed, and type 'perl openmoco-slim.pl'

I don't know how to adjust file associations on Mac boxes, so I can't help you w/ what the GUI does =)

!c

Hi Church I opened terminal

Hi Church
I opened terminal and typed "perl openmoco-slim.pl"

robert-c-fishers-macbook-pro-3:~ rcfisher$ perl openmoco-slim.pl
Can't open perl script "openmoco-slim.pl": No such file or directory

Next I put in a more complete file path.

robert-c-fishers-macbook-pro-3:~ rcfisher$ perl ~/openmoco/openmoco-slim/openmoco-slim.pl
Can't locate ./slim-help.pl in @INC (@INC contains: . /sw/lib/perl5 /sw/lib/perl5/darwin /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level /opt/local/lib/perl5/site_perl/5.8.9 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.9 /opt/local/lib/perl5/vendor_perl /opt/local/lib/perl5/5.8.9/darwin-2level /opt/local/lib/perl5/5.8.9) at /Users/rcfisher/openmoco/openmoco-slim/openmoco-slim.pl line 140.

Then I tried just dragging in openmoco-slim.pl and this is what I got, still no love

robert-c-fishers-macbook-pro-3:~ rcfisher$ /Users/rcfisher/openmoco/openmoco-slim/openmoco-slim.pl
: command not foundnmoco/openmoco-slim/openmoco-slim.pl: line 11:
: command not foundnmoco/openmoco-slim/openmoco-slim.pl: line 14:
/Users/rcfisher/openmoco/openmoco-slim/openmoco-slim.pl: line 15: BEGIN: command not found
: command not foundnmoco/openmoco-slim/openmoco-slim.pl: line 16:
/Users/rcfisher/openmoco/openmoco-slim/openmoco-slim.pl: line 17: syntax error n'ar unexpected token `{
/Users/rcfisher/openmoco/openmoco-slim/openmoco-slim.pl: line 17: `  if( $^O =~ '
MSWin/ ) {
robert-c-fishers-macbook-pro-3:~ rcfisher$

You need to change

You need to change directories, _into_ the directory containing it, as I said, and then type the command.

You're doing everything _but_ the cd command =)

cd /Users/rcfisher/openmoco/openmoco-slim
perl openmoco-slim.pl

!c

OK I did say I was a newby

OK I did say I was a newby :-)
I haven't used terminal or shell scripts much.

I did use cd as above and it cranked right up, thanks. The funny thing is it should have started after I dragged openmoco-slim.pl into terminal. I'll have to figure that out.

Also how do I load the examples?

thanks Church

You should look at the

You should look at the examples in your favorite text editor - I wouldn't suggest just running them, as they may not be appropriate to your setup, but they give you an idea of how to resolve some use-cases. (Especially more complex ones, using actions and keyframes.)

I'd start with just 'help' and 'help general' - help will show you all available commands, and 'help general' will give you an overview of the workflow, and introduce you to the most common commands.

Win32::SerialPort won't install with ppm?

Dan's picture

Hey Church!

So I thought I'd try an get slim up and running on my new windows7 64-bit lappy. I installed active perl v5.10.1 with ppm 4.10

I added the location to the repositories list and the perl package manager and then searched for it in the "all packages" column. I did several different searches to try and find Win32::SerialPort There is a bunch or Win32 stuff but nothing with serial port in it.

I did find something called test device serial port. So I thought what the hell I'll install that. Unfortunately.. "no dice" :( Any ideas?

Is there a more manual way I can install the module? like if I download it from here how would I install it?

Thanks for all you awesome work on this,

Dan.

EDIT: Seem to have got it working on a 32-bit installer of active perl

Mac OS X USB->Serial connection

morozgrafix's picture

My Arduino has been programmed with 0.82 of OpenMoco. So far I'm waiting for my easydriver boards to show up and prototyping with breadboard and LEDs.

I've been able to install MacPorts (http://www.macports.org/) and then ran following command to get Perl library installed (which in turn also updated my perl to 5.8.9):

sudo port install p5-device-serialport

so far so good:

--->  Computing dependencies for p5-device-serialport
--->  Fetching perl5.8
--->  Attempting to fetch perl-5.8.9.tar.bz2 from <a href="http://distfiles.macports.org/perl5.8
--->"
>http://distfiles.macports.org/perl5.8
---></a>  Verifying checksum(s) for perl5.8
--->  Extracting perl5.8
--->  Applying patches to perl5.8
--->  Configuring perl5.8
--->  Building perl5.8
--->  Staging perl5.8 into destroot
--->  Installing perl5.8 @5.8.9_3
--->  Activating perl5.8 @5.8.9_3
--->  Cleaning perl5.8
--->  Fetching perl5
--->  Verifying checksum(s) for perl5
--->  Extracting perl5
--->  Configuring perl5
--->  Building perl5
--->  Staging perl5 into destroot
--->  Installing perl5 @5.8.9_0
--->  Activating perl5 @5.8.9_0
--->  Cleaning perl5
--->  Fetching p5-device-serialport
--->  Attempting to fetch Device-SerialPort-1.04.tar.gz from <a href="http://distfiles.macports.org/perl5
--->"
>http://distfiles.macports.org/perl5
---></a>  Verifying checksum(s) for p5-device-serialport
--->  Extracting p5-device-serialport
--->  Configuring p5-device-serialport
--->  Building p5-device-serialport
--->  Staging p5-device-serialport into destroot
--->  Installing p5-device-serialport @1.04_0
--->  Activating p5-device-serialport @1.04_0
--->  Cleaning p5-device-serialport

then did following:

mkdir ~/openmoco
cd ~/openmoco
wget 'http://www.openmoco.org/downloads/Perl-OpenMoco-Interface-TimeLapse-0.03.zip'
unzip Perl-OpenMoco-Interface-TimeLapse-0.03.zip
cd Perl-API-TimeLapse-0.03/
perl Makefile.PL
sudo make install
cd ~/openmoco
wget 'http://www.openmoco.org/downloads/openmoco-slim-0.12.zip'
unzip openmoco-slim-0.12.zip
cd openmoco-slim-0.12
perl openmoco-slim.pl

And now the part that I've struggled with for a bit, Instructions seem to be related to Windows. For OS X your usb port is located at /dev/tty.usbserial-XXXXXX Easiest part to verify this, is by going back to your Arduino App and clicking on Tools -> Serial Port and looking at which port is checked there (after all this is a port that you've used to upload your sketch to the Arduino board). In my case this port was /dev/tty.usbserial-A7004yGE
Now back to terminal window that is running slim:

[1] > port /dev/tty.usbserial-A7004yGE
[2] > connect

When you execute connect look at TX and RX LEDs on your Arduino board, they should flicker a bit.

Now you should be good to go, type

[3] > help

and learn what different commands are doing.

Loading and Running Slim in Apple OSX

Panascape's picture

I was able to get the Timelapse Engine compiled and running on my Arduino.

A couple of questions about loading Slim through the Terminal application on my Mac.

First Question - I am having issues loading the device-serialport package. I downloaded Fink and installed it on my machine. When I try to install Device::SerialPort in Terminal, this is the result I get:

Last login: Sun Mar 28 17:31:01 on ttyp1
Welcome to Darwin!
localhost:~ davidgarden$ sudo fink install device-serialport
Password:
Information about 1997 packages read in 2 seconds.
Failed: no package found for specification 'device-serialport'!
localhost:~ davidgarden$

Second Question - I am also having issues loading up Slim and the Perl API files. When I try to use the install text you suggest using in Terminal, this is the result I get:

localhost:~ davidgarden$ mkdir ~/openmoco
mkdir: /Users/davidgarden/openmoco: File exists
localhost:~ davidgarden$ cd ~/openmoco
localhost:~/openmoco davidgarden$ wget 'http://www.openmoco.org/downloads/Perl-OpenMoco-Interface-TimeLapse-0.02.zip'
-bash: wget: command not found
localhost:~/openmoco davidgarden$ unzip Perl-OpenMoco-Interface-TimeLapse-0.02.zip
unzip: cannot find or open Perl-OpenMoco-Interface-TimeLapse-0.02.zip, Perl-OpenMoco-Interface-TimeLapse-0.02.zip.zip or Perl-OpenMoco-Interface-TimeLapse-0.02.zip.ZIP.
localhost:~/openmoco davidgarden$ cd 0.02
-bash: cd: 0.02: No such file or directory
localhost:~/openmoco davidgarden$ perl Makefile.PL
Can't open perl script "Makefile.PL": No such file or directory
localhost:~/openmoco davidgarden$ sudo make install

Any thoughts you might have would be greatly appreciated. I am new to the idea of using Terminal and Perl.

Thanks so much,

David Garden
Santa Monica

Sorry if this is a dumb

CaptiveLight's picture

Sorry if this is a dumb question, but I don't have much experience with command prompts.
I'm following the above instructions. I've installed nmake per these instructions:
http://www.herongyang.com/Perl/RPC-XML-Install-NMake.html
Now I'm at the part where I change directories (which I did) then I type

perl Makefile.#007788;">PL

and I get

Can't open perl script "Makefile.#007788;>PL": Invalid arguement

Any ideas on what I'm doing wrong?

Again, sorry but I'm new to this.

What version of Windows are

What version of Windows are you running, and what file system is your drive? (I'm supposing that you might have a FAT32 partition instead of an NTFS partition, meaning your filesystem doesn't support colons in filenames...)

In this case, you might as well do it the "dirty" way, which is to create the library path and install the library file directly in its final location. First, find your perl library directory, by default it should be something like c:\perl\site\lib -- you want the 'site' directory, do not use 'lib' from the root perl directory.

Then, just use windows explorer to copy the library from the TimeLapse library directory. Go into the TimeLapse library directory, inside of lib, you'll see a folder named OpenMoco - copy that to the perl library directory you identified earlier. Now, you should be able to click on the openmoco-slim.pl script in its folder, or run it from the command prompt.

No joy in Mudville

CaptiveLight's picture

Ok, so my HD was in Fat32 so I reinstalled XP Home edition 2002 SP2 on a NTFS drive. Followed your reply instructions above and I'm pretty sure that I got it to do what it was supposed to do. Then I moved on to the next step, installing Slim. I DL'ed it, unzipped it, dbl clicked on openmoco-slim.pl and it takes me to a website.... I don't know what it's supposed to do but I don't think thats it!

Please understand, I'm a mechanical engineer by trade, photographer by heart. I'm good with computers and programs, but this is a whole different side of computing for me. I don't know exactly what Perl is or even what the end result would be if I followed these instructions correctly. I want to learn how to interact with the Arduino, but I'm having a hard time with these intermediate steps. I think it's safe to say that this Toto is not in Kansas anymore!

Is anyone willing to do a remote assistance session with me to get this set up correctly?

Thanks, Ben

Ben, you didn't need to

Ben, you didn't need to re-install windows, my previous instructions were how to get around the limitation.

Did you install activeperl as I stated in the instructions, or did you install some other perl from some other place?

Perl is just a programming language, that happens to be run-time compiled. There's nothing unusual about it, or anything else - it just makes it quick and easy for me to write scripts, and for others to modify them. You can use any programming language you like to interact with the Arduino, it's just that I've already done the whole serial protocol for the OM engine in perl, so starting fresh you'd have to start from the beginning with a different language.

As you haven't said what website you're taken to when clicking on a perl file in windows explorer (not internet explorer!), I have no idea what might have happened for you - but it sounds to me like you've got something else going on on your system. You'll note in the instructions in this article, it has two ways of running the script, try the other (from the command line), it sounds like your program associations have gotten messed up in some way, and it's a little beyond my abilities to debug that sort of thing remotely =)

The correct end-result of running slim, is seeing a command prompt, that says it's OpenMoco Slim and waiting for you to enter a command. Unfortunately, I am not able to provide remote support live, but there is great support from activestate on getting activeperl up and running and making sure everything is right there.

!c

Perl help

CaptiveLight's picture

I re-installed Windows mainly because this is an 8 year old laptop thats been sitting, unused, in the corner for the past 3 years. It was running pretty slow, so I put a fresh load on it and now it only has OpenMoco programs and AVG. I'll have enough problems on my own without starting out with a "limitation". I want this cpu setup exactly as you have described to do on this page. Having followed your instructions per this page (with the exception of using Perl-OpenMoco-Interface-Timelapse-0.03 instead of 0.02)

ActivePerl was downloaded from the link provided above.

Having never written any code or programed anything, other than a calculator in VB for school, I'm in way over my head here. But I try to learn something new everyday. I don't want to re-invent the wheel when I can use the one that you've spent a lot of time making.

As for the problem that I'm having here is a screen shot that should answer the questions you asked:

Can you tell what I'm doing wrong from this?

Thanks, Ben

Links vs. Files

Ben,

It looks like you right-clicked on the top-level links and used 'save as'. What you've actually saved are HTML files, or links to the pages. You can tell that by the icons, using an IE icon and showing the redirect arrow. Also note that the target of the top-level links on the sourceforge page are to view the revision log, further indicating you did not download the files, but instead created a link to the revision log page.

Instead of using IE at the top-level (e.g. with 'save target link as'), you'll find at the bottom of the sourceforge page a 'Download GNU tarball' link. Clicking that will result in the download of a .tar.gz file - your unzip app should handle that, which will have all of the files. Alternatively, you can download an SVN client and use it directly (best, but most complex way).

Finally, if you wish to just download the files directly out of your browser, first click on the link for each file - which will take you to the revision log (which you've currently saved links to), and you'll see three links at the top next to the label HEAD: 'View', 'Download', and 'Annotate'. Right-click on 'download' and use 'save target as'.

!c

Windows Com Ports Greater than 9

For windows users, if the COM port used by your arduino is listed at a number higher than 9 (COM9), you'll get an error from Slim if you try to enter it in the normal way. To make it work, use the following notation:

[1] > port \\.\COM10

Note: that's backslash-backslash-dot-backslash-comport

!c