flashing led

pfroment

New Member
greetings

I have a model railroad layout with a harbor. I want to insert a red led onto a lighthouse and have it dim on and off. what chip should i use and can someone give me the code to do this project.

thanks

paul f
 

johnlong

Senior Member
Hi pfroment
Welcome to the forum
the cheepest chip is the 08M2 which will suit your needs
your simplest code for it
is
#picaxe 08m2
do
high C.2' turn the led on
pause 1000'high for some time
low C.2'turns it off
pause 1000'low for some time
loop
just copy the above into the editor and simulate it
 

johnlong

Senior Member
Hi
you mighy need the more adept user for that not a command I have looked into yet
but have a look at page 172 of the manual 2 pwm
it is used to run a motor at variable speeds so should be able to fade in and out
just a quick search using fading out an led produced
can i control the brightness of 2 or more leds with PWM
have a read of that and strip Hippys code down to 1 led
have fun
 

westaust55

Moderator
Here is a link to a lighthouse simulation thread that also has links to other threads:
 
Top