aboutsummaryrefslogtreecommitdiff
path: root/README
blob: 27a8c0095053dfe5e51710580e9c2549e8ed525d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
ToyKeeper's flashlight firmware repository
==========================================

This is a collection of firmware for flashlights or torches, mostly 
collected from BLF (http://budgetlightforum.com/).  It's collected 
here mostly for convenience, and to provide bug tracking and revision 
control services for the code.

See the INDEX file to find out which projects might be relevant to 
your needs.


Getting Started
===============

A general overview of what you need to get going is here:

  http://flashlightwiki.com/AVR_Drivers

Some useful hardware for flashing firmware:

  http://www.fasttech.com/product/1002900-atmega-attiny-51-avr-isp-usbasp-usb-programmer
  http://www.fasttech.com/product/1011800-40-pin-splittable-ribbon-cable-20cm
  http://www.digikey.com/product-detail/en/5250/501-1311-ND/745102

For Windows users, these links may be useful:

  Hoop's guide:

    http://budgetlightforum.com/node/36216

  Comfychair's guide:

    http://budgetlightforum.com/node/29081

  WarHawk-AVG's guide:

    http://budgetlightforum.com/node/29684

  Getting a USBasp to work in Windows:

    http://rayshobby.net/dead-simple-driver-installation-for-usbasp-and-usbtiny-on-windows/
    http://www.protostack.com/accessories/usbasp-avr-programmer

To set up an attiny dev environment on Ubuntu (13.10):

  sudo apt-get install flex byacc bison gcc libusb-dev libc6-dev
  sudo apt-get install gcc-avr avr-libc binutils-avr
  sudo apt-get install avrdude avrdude-doc

  Optional:  (make avrdude usable by non-root users, is a security risk)
  sudo chmod u+s $(which avrdude)

Building/installing attiny dev tools on other UNIX systems (in general):

  http://www.ladyada.net/learn/avr/setup-unix.html

After wiring everything up, this tests the connection to the ATTINY13A chip:

  avrdude -p t13 -c usbasp -n
  (you may need to put 'sudo' in front, on UNIX systems...
  or set the suid bit on the avrdude binary, which is convenient but a
  potential security risk)

To test if you can flash firmware correctly, or to restore a light to something
like a default state, try flashing the NLITE driver from DrJones.  It's similar
to the default nanjg / qlite firmware, but better.

  ./bin/flash.sh DrJones/NLITE/nlite.hex

For a quick test to make sure your tool chain works and your flashing tools
are working, try the 'hello world' program:

  cd hello_world
  make
  make flash

If that works, you should be ready to start making changes to the code, or
flashing any of the pre-built firmwares.
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.