Drawbot Using Wixels to send commands from a PC

I like wireless programming and have been using Wixels pretty extensively. My latest project is called Drawbot which is modeled after the turtle drawbots of the 1980’s. But unlike them it isn’t tethered via a cable to a computer. A Wixel pair lets it draw completely unimpeded, but still get commands from the user’s PC.

This bot made the Hacked Gadgets forum:

hackedgadgets.com/2014/08/05/dra … nt-1852285

Because it uses FORTH is fully remotely programmable. Here’s the bill of materials:

1   small sheet 1/4 Hobby plywood  ($3)
2   eBay steppers                  ($5)
2   Wheels from Propeller Powered  ($4)
6   Parallax L mounting brackets   ($2)
1   1.25" caster                   ($1)
10  1" Parallax standoffs          ($1)
1   standard Servo                 ($12)
2   Pololu Wixels for wireless serial ($20)
1   Propeller Platform                ($37)
1   Wulfden Robot Control Board    ($14)
1   Medium sized breadboard        ($4)
2   3 AA battery holders           ($6)
1  small piece of brass tubing     ($1)
1  paperclip
?  4-40 nuts and bolts

I had the Propeller Platform and Robot Control Board laying around from a dismantled project, so I repurposed them here. A quick start board and a little bit of breadboard work could save a fair bit of the budget. AmForth on a Baby Orangutan would probably work with some porting between Forth dialects. The two hardest parts of the project were cutting and drilling the plywood which took an afternoon, and the FORTH programming which has been several two hour sessions so far.

Here’s my current source code which could use some better comments.

\ Before loading this program load PropForth servo library (change to cog 0, and Nicholas G. Lordi's Robot Control Language
\ start the drawbot by initializing the servo library and the robot command language. The 0 GF halts the robot.
: start_drawbot
    sm_start_servos START 0 GF ;

\ pen up using servo on pin 0
\ The hex magic number is the servo pulse width determined
\ by trial and error
: PU
    0 h15E0 sm_setpos 500 delms ;

\ pen down using servo on pin 0
\ Again, the hex constant was determined experimentally.
: PD
    0 hCE4 sm_setpos 500 delms ;

\ A set of draw moves.

\ Move without drawing 2 forward.
: SPACE
  PU 2 GF ;

\ Draw a line 4 long
: STROKE
  PD 4 GF ;

\ Draw a line 2 long
: DASH
  PD 2 GF ;

\ Go down one line and back to the start of the row.
: CRLF
  PU 90 GC 6 GF 90 GC 30 GF 180 GC ;

\ Draw a letter H
: H
  90 GCC
  STROKE
  PU 2 GB
  90 GC
  DASH
  PU 90 GCC 2 GF 180 GCC
  STROKE
  PU 90 GCC
  SPACE ;

\ Draw a letter E
: E
  90 GCC
  STROKE
  PU 90 GC
  PD 3 GF
  PU 3 GB 90 GC
  2 GF 90 GCC 
  DASH
  PU 2 GB 90 GC
  2 GF 90 GCC
  PD 3 GF
  SPACE ;

\ An L
: L
  90 GCC
  STROKE
  PU 4 GB 90 GC
  PD 3 GF
  SPACE ;

\ and an O
: O
  90 GCC
  STROKE
  90 GC 3 GF 90 GC
  STROKE
  PU 90 GCC 3 GB
  PD 3 GF
  SPACE ;

: W
 90 GCC
 STROKE
 PU 4 GB
 45 GC
 DASH
 90 GC
 DASH
 135 GCC
 STROKE
 PU 4 GB
 90 GC
 SPACE ;

: R
  90 GCC
  STROKE
  90 GC
  DASH
  30 GC
  DASH
  60 GC
  1 GF
  30 GC
  DASH
  60 GC
  DASH 
  180 GC
  DASH
  30 GC
  
: D
  90 GCC
  STROKE
  90 GC
  DASH
  30 GC
  DASH
  60 GC
  1 GF
  30 GC
  DASH
  60 GC
  DASH
  PU 180 GC
  SPACE SPACE ;

\ Draw the word HELLO 
: HELLO H E L L O ;

\ Draw the word WORLD
: WORLD W O R L D ;

\ Yes, it's HELLO WORLD in FORTH
: HELLO_WORLD HELLO CRLF WORLD ;

Here are two videos of the robot in action:

Hello, Martin_H.

Thanks for posting another great robot project. I have used the BASIC Stamp 2 Microcontroller in some of my projects as well. BASIC Stamps are a great place to get started using microcontrollers. Keep up the good work. You do a great job of documenting a lot of useful information like your materials list and code. I am sure many of our forum members appreciate you sharing your work. I hope to see more of your robots in the future!

-Derrill