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.

Camera Panorama robot head (panograph)

Step 105 Programming the picaxe

5 Programming the picaxe
A overview of picaxe can be found at http://www.rev-ed.co.uk/picaxe/

Basically download the programming editor found at this link and connect up the serial cable (if no serial socket on your pc use a serial to usb convertor)

Copy & paste the code below to programme your picaxe:

nb the latest code is version 0.2, take the appropriate code for your canon firmware sdm or chk

'*** Panograph by Waldy 0.2 for sdm
'*** Program constants
symbol top = 175
symbol bottom =250
symbol left = 180
symbol right = 100
symbol vstep = 25
symbol hstep = 20
symbol servo_delay = 1000
symbol camera_steady_delay = 2000
symbol camera_ready_delay = 2000
main:
GOSUB Init
for b2 = top to bottom step vstep
for b1 = right to left step hstep
servo 1,b1
pause servo_delay
GOSUB take_picture
pause camera_ready_delay
next b1
servo 2,b2
pause servo_delay
next b2
end

take_picture:
high 4
pause 30
low 4
return

Init:
servo 2,top
pause servo_delay
SERVO 1,right
pause servo_delay
low 4
return

'*** Panograph 0.2 by Waldy for chdk
'*** Program constants
symbol top = 175
symbol bottom =250
symbol left = 180
symbol right = 100
symbol vstep = 25
symbol hstep = 20
symbol servo_delay = 2000
symbol camera_steady_delay = 4000
symbol camera_ready_delay = 2000
main:
GOSUB Init
for b2 = top to bottom step vstep
for b1 = right to left step hstep
servo 1,b1
pause servo_delay
GOSUB take_picture
pause camera_ready_delay
next b1
servo 2,b2
pause servo_delay
next b2
end

take_picture:
low 4
pause 30
high 4
pause 1000
low 4
pause 1000
high 4
return

Init:
servo 2,top
pause servo_delay
SERVO 1,right
pause servo_delay
high 4
'GOSUB take_picture 'dummy pic
return

*****Panograph controller v0.1 for sdm
** Program constants
' Delay to slow down servo motion (30ms default)
symbol servo_delay = 60 'recommended delay between servo movements
symbol top = 160 'max y position
symbol bottom =220 'min y position
symbol left = 180 'min x position
symbol right = 100 'max x position
symbol vstep = 20 'vertical increments
symbol hstep = 20 'horizontal increments
symbol pic_delay = 100
symbol camera_steady_delay = 4000 'delay to steady camera after movement

main:
GOSUB Init
for b2 = top to bottom step vstep
for b1 = right to left step hstep
servo 1,b1
pause servo_delay
GOSUB take_picture
pause camera_steady_delay
next b1
servo 2,b2
pause servo_delay
next b2
end

take_picture:
high 4
pause 30
low 4
return

Init:
servo 2,top
low 4
return

« Previous StepDownload PDFView All StepsNext Step »

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!
9
Followers
3
Author:waldy