Tail Light Flasher - 8M.bas 'Alternate LED Tail Light Flasher for a Caboose 'Uses Picaxe 08M 'This is more controllable than a 555 timer, less parts '1x IC, 3x Resistors, 2x Pots, 1x Plug. 'Pot's on legs 3 & 5 (ADC 4 & 2) 'LED's on legs 6 & 7 (Output 1 & 0) 'Uses 35 Bytes out of 256 avaliable '********************************************************** symbol LED1 = 0 'LED on Output 0 Leg 7 symbol LED2 = 1 'LED on Output 1 Leg 6 symbol Del1 = W1'Length of Flash 0 - 1023 mS symbol Del2 = W2'Period time 0 - 5115mS symbol Pot2 = W3'TPot Value 0 - 1023 '********************************************************** output LED1 'configure Leg 7 as an Output output LED2 'configure Leg 6 as an Output START: readadc10 2,Del1 'read pot on ADC2, leg5, store in W1 readadc10 4,Pot2 'read pot on ADC4, leg3, store in W3 Del2 = Pot2 * 5 'multiply W3 by 5 '********************************************************** LED1: high LED1 'led1 on pause Del1 'on time low LED1 'led1 off pause Del2 'inter flash delay '********************************************************** LED2: high LED2 'led2 on pause Del1 'on time low LED2 'led2 off pause Del2 'inter flash delay goto LED1 'forever '********************************************************** |