#LightSticks. Pocket lights for your travel object photography.

![LightSticks Fading](https://shalnoff.com/pics/2020/LightSticks/2024_04_18:Lightsticks_in_Dark.mp4.gif)

Small light sources for illuminating objects when taking pictures of small objects. Place two lightsticks on the sides, add a backlight behind the object and voila, you have a small photo studio on your desk. 

You can use toothpicks to set the sticks vertically or hang them inside glass beakers. 

![LightSticks Fading](https://shalnoff.com/pics/2020/LightSticks/lightStick_face.jpeg)

I usually carry a small roll of matte plastic to make vertical tubes and soften the shadows + a roll of black paper to set the background. 

To extend the wand, just plug in an extender. 

#Hardware and firmware

![LightSticks set](https://shalnoff.com/pics/2020/LightSticks/lightSticks_blackBG.jpeg)

The device is based on attiny25 and has on board a switch, two buttons to control the brightness and also to memorise the settings (by pressing both buttons at the same time) + little beeper, to beep various signals. 

If the device is idle for some time, it goes to sleep. 

To recharge the device, simply plug it into the USB socket of your powerbank or laptop. 

Compile firmware

	cd FIRMWARE 
	make

#Bootloader 

A remarkable feature of the device is the ability to flash the bootloader (I'm using popular [micronucleus](https://github.com/micronucleus/micronucleus)). In this case you can change fine settings, recompile the firmware and flash the device without additional equipment. 

Compile the bootloader 

	cd BOOTLOADER/micronucleus/firmware
	make clean
	make CONFIG=t85_default fuse
	make CONFIG=t85_default flash

Flash using USB bootloader

1. Set device in Flashing Mode by connect extender in reverse (long sides in same direction)
2. Plug device in USB socket
3. Compile and flash firmware using micronucleus (you need to turn off and on device to enter Bootloader Mode)  

and then

	cd FIRMWARE
	make
	sudo BOOTLOADERS/micronucleus/commandline/micronucleus --run lightstick.hex 

Have fun :)

![LightSticks Beer Bottle Photo](https://shalnoff.com/pics/2020/LightSticks/Kapuziner_beer_.jpg)

## License

Copyright © 2020 Dmitry Shalnov [interplaymedium.org]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this files except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.




