[video]www.youtube.com/watch?v=HCReWdnqc44[/video]I am trying to get this bit of code to work, the wing tip strobes no problem but the rotating beacon fade needs a pulse at the end which so far has
beaten me.
The fade works a treat (HAKU 03-09-2010) but needs a flash at the end .
New Code with problems solved using HAKU sugestions
'Model aircraft mars beacon
' Wing tip strobe pins 3 and 6
'Flash and rotate beacon for other hazards pin 5
'Haku 03-09-2010
#picaxe 08m2
Main:
do
for b0=0 to 100 'Count up
w1=b0*b0/10 'square pwm smooth
pwmout 2,249,w1
pause 10 ;pin 5
next b0
pause 300
for b0=100 to 0 step -1 'count down
w1=b0*b0/10
pwmout 2,249,w1
pause 10
next b0
pwmout 2,249,1000 ' full brightness
pause 300
pwmout 2,249,0 ' no brightness
Flash:
pulsout B.1,800 'Portwing 2 flashes pin 6 red
pause 200
pulsout B.1,800
pause 200
pulsout B.4,800 'Starbourd wing 2 flashes pin3 green
pause 200
pulsout B.4,800
pause 200
loop ;loop back to start
beaten me.
The fade works a treat (HAKU 03-09-2010) but needs a flash at the end .
New Code with problems solved using HAKU sugestions
'Model aircraft mars beacon
' Wing tip strobe pins 3 and 6
'Flash and rotate beacon for other hazards pin 5
'Haku 03-09-2010
#picaxe 08m2
Main:
do
for b0=0 to 100 'Count up
w1=b0*b0/10 'square pwm smooth
pwmout 2,249,w1
pause 10 ;pin 5
next b0
pause 300
for b0=100 to 0 step -1 'count down
w1=b0*b0/10
pwmout 2,249,w1
pause 10
next b0
pwmout 2,249,1000 ' full brightness
pause 300
pwmout 2,249,0 ' no brightness
Flash:
pulsout B.1,800 'Portwing 2 flashes pin 6 red
pause 200
pulsout B.1,800
pause 200
pulsout B.4,800 'Starbourd wing 2 flashes pin3 green
pause 200
pulsout B.4,800
pause 200
loop ;loop back to start
Last edited: