Thursday, May 1, 2008

[prototype12_relays]













hooked up three relays, each to its own 9v and flexinol...



but there was very little movement. We tried tightening the flexinol, using lighter gauge piano wire, connecting to bigger scarier batteries, but without much success. Experimented with paper (instead of piano wire) and got a much greater range of movement.



PBASIC CODE:

' {$STAMP BS2}
' {$PBASIC 2.5}

check VAR Byte
proIn VAR Byte

Main:
DO
check = IN3
proIn = IN10

SERIN 16, 16780, [proIn]

IF proIn > 0 THEN
IF proIn <>

HIGH 9
LOW 2
HIGH 15
PAUSE 5000
LOW 9
HIGH 2
LOW 15

ENDIF
ENDIF

IF proIn > 13 THEN
IF proIn <>

LOW 9
HIGH 2
LOW 15
PAUSE 2000
HIGH 9
LOW 2
HIGH 15
PAUSE 2000
LOW 9
HIGH 2
LOW 15
PAUSE 2000
HIGH 9
LOW 2
HIGH 15

ENDIF
ENDIF

IF proIn > 20 THEN
IF proIn <>

HIGH 15
LOW 2
HIGH 9
PAUSE 1500
LOW 15
HIGH 2
LOW 9
PAUSE 1500
HIGH 15
LOW 2
HIGH 9
PAUSE 1500
LOW 15
HIGH 2
LOW 9

ENDIF
ENDIF

LOOP
END

Labels: , , ,


Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?