3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

K'nex Programmable Automaton

Step 3Programming the Automaton

Programming the Automaton
«
  • HPIM4529.JPG
  • HPIM4653.JPG
  • HPIM4654.JPG
  • HPIM4649.JPG
Looping the string under allows moves the vehicle forward on that side. Looping the string over moves the vehicle backward on that side. To allow the vehicle to move forward, both spindles would loop under; to turn right, the right spindle loops over and the left spindle loops under, and vice versa. Keep in mind that the code runs in reverse, with the top most string layers coding for the first actions of the automaton.

To simplify programming and to allow easy distribution of different scripts, I have set up a simple coding syntax. I suggest coding in notepad so the spacing is even.

This is how the script for each wheel starts, with a L and R for the respective left and right wheels. Y is a number, and x is a unit of measurement. The Yx shows the length of the string in a particular unit. So, 8meters, for example.
Yx
L/
R/

Each spindle has 8 rods, so moving forward (looping the string under) one complete spindle revolution would be the following. u is for looping under, and o is for looping over. A // signifies the end of code."

L/8u//
R/8u//

L/5u/3o//
R/8u/--//
The script above shows a slight left turn. A 5u signifies that a grey connector be placed on the 5th rod from the origin, with the origin being 1, and a turn of direction occurring on the 5th rod. The other side has -- to help balance out the script to make it easier to code.

An "s" signifies a stop loop around a grey connector. An example would be
L/5u/3o//
R/8s/--//
This means the that on the right spindle, the string is to be looped 360 degrees around the grey connector, signifying a stop. The stop should end in the same direction it started.

That's all there is to it. On the next step I have provided some sample measurements and scripts to combine into more complex scripts.
« Previous StepDownload PDFView All StepsNext Step »
4 comments
Dec 6, 2008. 1:55 AMThe Jamalam says:
Here is a sample script: L/8u/5o/8u/5o// etc R/5o/8u/5o/8u// etc Giives a sort of Snakey S shaped path Here's another one: L/32u// R/32o// Goes around in circles. lol fun to watch
May 5, 2008. 6:56 AMeLeet says:
You might consider adding a video to this step- although I understand how Automata work from previous experience, to those who haven't familiarized themselves with them in the past, it might be a bit confusing ;)

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
33
Followers
9
Author:crestind