Skip to content

Commit 616cf62

Browse files
committed
update README
1 parent a878d76 commit 616cf62

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,38 @@
11
ImageToHacklace2
22
================
33

4-
This tool converts images files into a string of hexadecimal bytes which can be downloaded as part of an animation onto the "HackLace2" * (see http://wiki.fab4u.de/wiki/Hacklace).
4+
This tool converts images files into a string of hexadecimal bytes which can be downloaded as part of an animation onto the "HackLace 2" (A Necklace for Hackers - see [1]).
5+
6+
**supported image formats**
7+
8+
- Bitmap (BMP)
9+
- Graphics Interchange Format (GIF)
10+
- Portable Network Graphics (PNG)
11+
- JPEG File Interchange Format (JPG / JPEG) - not recommended, based on the compression rate and the resulting artefacts the result might not be what you expect
12+
13+
A pixel with white color will be converted as "LED = on" any other pixel will be converted as "LED = off". Best results you will get with monochrom images.
14+
15+
**supported image size**
16+
17+
- width: 1 <= x <= 255
18+
- height: 1 <= y <= 8
19+
20+
If the image is greater in one dimension then this dimension will be truncated to the maximum value. The origin of ordinates is the upper left corner of the image. The height will be converted always as 8 pixel height. If the height of the input image is less than 8 pixel, the missed pixel converted as "LED = off".
21+
22+
**usage - convert a single image**
23+
24+
```
25+
java -jar ImageToHacklace2.jar image_file
26+
```
27+
28+
The output, for example might look like `\1F 08 00 20 42 40 5C 40 42 20\`, you can use as datablock for the Hacklace 2 animation app.
29+
30+
see an example for the Linux shell:
31+
32+
```
33+
printf '\eHL\\00 70 01 1F 08 00 20 42 40 5C 40 42 20\\ \\00 1F FF\\' > /dev/ttyUSB0
34+
```
35+
36+
For further information about the above command have a look on the Hacklace 2 wiki[1].
37+
38+
[1] http://wiki.fab4u.de/wiki/Hacklace

0 commit comments

Comments
 (0)