Skip to content

Making bCodes

Tim edited this page May 22, 2024 · 9 revisions

Making bCodes involves creating bCode images with the bcode_maker.jar program, printing them, and then cutting the printed bCodes out.

Creating printable bCodes

The size of the printed bCodes depends on the bcode_maker.jar parameter settings and the resolution of your printer. The formula for calculating the bCode side length in mm is (square.side.length * 12 + padding * 2) / printer.resolution * 25.4.

square.side.length and padding are parameters that you can set to suit your needs. The former determines how big the features on the bCode are while the latter adds extra white space around each bCode. The unit of both parameters is printer dots. The value of printer.resolution depends on your printer and needs to specified in dots per inch (dpi).

For example, if your printer has a resolution of 800 dpi and you use a square.side.length of 5 pixels and a padding of 2 pixels, your bCodes will have a side length of 2.032 mm. To make such bCodes, run

java -jar bcode_maker.jar square.side.length=5 padding=2 bcode.file=bcodes.png

This will create an image named bcodes.png. Printing this image on the aforementioned printer will result in a sheet of bCodes of the expected size, which can be cut out and attached to bees, ants, or other small insects.

Hints

Before printing, it's a good idea to check if the generated bCodes image fits on a printer page. If not, you will need to split the image into multiple parts and then print each part individually.

We've had reasonably good success cutting bCodes with scissors. However, a steel ruler and razor blade are usually more precise and recommended for small bCodes.

Getting started

Making things

Identifying individuals

Detecting behavior

Miscellaneous

Clone this wiki locally