Quick and dirty candle effect with PIC12F675
by
Published on - 1st September 2011 03:30
For best results use a clear amber LED, you can embbed the LED using a tube as cast and pouring molten parafin...
Code:
'****************************************************************
'* Name : RGB12F675 *
'* Author : Ivan Rosales, Guadalajara México *
'* Notice : Copyright (c) 2011 Ivan Rosales *
'* : All Rights Reserved *
'* Date : 31/08/2011 *
'* Version : 1.0 *
'* Notes : Efecto de Vela en Pin 5 (GP2) *
'* : Utilizar preferentemente LED Ambar *
'****************************************************************
@ Device PIC12F675,WDT_ON,PWRT_ON,PROTECT_OFF,MCLR_OFF,BOD_OFF
ansel=0 'No usar ADC's las entradas serán digitales
cmcon=7 'No usar comparadores analógicos
trisio=%001011 'GP2 Será salida
DEFINE OSCCAL_1K 1 'Auto-Calibración del reloj interno
'Definiciones
Vela var GPIO.2
Luz var byte
X var byte
Ciclos con 25
'Programa
Pral:
random luz
luz=luz//(255-ciclos)
if luz<120 then luz=luz+50
for x=1 to ciclos
pwm vela, luz+x, 1
next
goto pral
end
Re: New project - MSFS C++ USB interface
So I have a need to override a pushbutton (from ON to OFF) and came up with this concept; a solenoid piggyback on a pushbutton switch with a 3D printed cap held by a strand of wire.
Demon - 25th April 2024, 23:21...