~gabe/flashlight-firmware/anduril2

« back to all changes in this revision

Viewing changes to Werner/candleflicker/README

  • Committer: Selene Scriven
  • Date: 2016-11-29 22:51:09 UTC
  • mto: This revision was merged to the branch mainline in revision 176.
  • Revision ID: ubuntu@toykeeper.net-20161129225109-oab58sah3mb7mk1j
Copied biscotti.c to gchart/babka/babka.c

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Candlelight Flashlight with a nanjg
 
2
Werner
 
3
Wed, 10/29/2014 - 11:18
 
4
 
 
5
 
 
6
The season of candlelights and lanterns is coming, I felt the need of a
 
7
flashlight which has a artificial candle flickering.
 
8
 
 
9
A short google search shows a lot of guys already did this so less work for me
 
10
 
 
11
This guy used a photodiode to sample a flickering candle and gave some basic
 
12
instructions on how to simulate that:
 
13
 
 
14
http://inkofpark.wordpress.com/2013/12/15/candle-flame-flicker/
 
15
 
 
16
This guy implemented a very simple version for a tiny13
 
17
 
 
18
https://github.com/mokus0/avr-shake/blob/master/examples/flicker/flicker.c
 
19
 
 
20
Comparison:
 
21
 
 
22
http://inkofpark.wordpress.com/2013/12/23/arduino-flickering-candle/
 
23
 
 
24
I stole the project from github and tried it, worked like I wanted it to be so
 
25
I changed it to use the standard nanjg outputpin and flashed it on a nanjg
 
26
ak47.
 
27
 
 
28
Here is the code I used:
 
29
https://www.dropbox.com/s/vkdaowql47vdp2s/candleflicker.rar?dl=0
 
30
 
 
31
I just flashed it on a standard nanjg with standard fuses FD and 75. It runs on
 
32
9Mz which is probably to fast for the small voltage but it seems to work well I
 
33
will try it out when I find more time. I also have the compiled hex in the
 
34
project folder so you simply can flash it like every other firmware. This has
 
35
no modes or battery protection or anything else it is just a in my eyes good
 
36
working flickering code. For indoor use it is a bit nervous to look at the
 
37
"flame" but in a lantern/box it works like a candle in the wind