Missing Code Parts

joemahma

New Member
Greetings,
Code:
     #picaxe 08m

do
 for b0=0 to 100
  w1=b0*b0/10
  pwmout 2,249,w1
  pause 5
 next b0

 for b0=100 to 0 step -1
  w1=b0*b0/10
  pwmout 2,249,w1
  pause 5
 next b0

loop
This little code has done wonders for me in the flashing strobes that have been on my homebuilt aircraft! However, I need to put the TWO HI- INTENSITY FLASHES back into the middle of the cycle. I have lost the code to do this and need to replace it pronto! My questions are two: 1) Is it possible to insert two momentary flashes (to emulate the passing of the beacon reflector) within THIS code; and 2) is it possible to use an 08M2 instead of an 08M chip, as this chip is very hard to find?

I have searched your pages for an answer, finding none that I could make work, and my original code problems were solved in great measure by Goeytex--who seems a bit scarce these days. Hope he's OK. Oh yeah, this chip drives a 13-LED mini-wedge bulb (superbrightleds.com) off of my airplane's (KR2) 12 volt system, through a filtered 7805 and then an IRL520.

Any and all help very much appreciated.
 
Last edited by a moderator:

PaulRB

Senior Member
Hi,

An 08m2 should be a drop-in replacement for your 08 here.

For your intense flashes, look up the PULSOUT command in vol 2 of the picaxe manual.

Paul
 

SAborn

Senior Member
Why would just using the high/low command not work, something like.....

Code:
#picaxe 08m2

do
for b0=0 to 100
w1=b0*b0/10
pwmout C.2,249,w1
pause 5
next b0



[COLOR="#0000FF"]for b0 = 0 to 1
High C.2
pause 50
low C.2
pause 50
next b0[/COLOR]


for b0=100 to 0 step -1
w1=b0*b0/10
pwmout C.2,249,w1
pause 5
next b0

loop
I changed the PIN code from "2" to "C.2" which is required for a 08m2 chip, even though the compiler would have done it for you if you had changed the chip type at the top of the code (#picaxe 08m to #picaxe 08m2)
 
Top