#theWorldIsMadeOutOfLanguage – FingerprintScapes_1

image

just received a 5v Fingerprint scanner – TTL GT-511C3 by Sparkfun from floris.cc.

The idea is that I could use it to generate landscape shapes(1) (or other digital stuff) to create a 3d milieu (that you could also maybe later “walk” around in), to see how that could be.

This is the first exploration in in #theWorldIsMadeOutOfPeople (explained here), and also fills the purpose of giving me a reason to engage with interfacing electronics.

/* 1) Initially I imagined it to look somehow like that Joy Division t-shirt that everybody has in terms of general aesthetics, although this might change once I have a look at the data */

So; What I want to do is to capture finger prints || fingerprint data and receive it as an image || data stream that I can use it somewhere else (maxMSP / Processing) to generate digital stuff.

Questions:

  • How do you talk to it?
  • what does it tell you?
  • what does it mean?

The sensor come some pre-made software to communicate with it but it only runs on windows and does not seem to support streaming data from the device in a useful way, but ppl seem to use it with arduino to make locks on there garages so connecting it to an arduino seem like a reasonable way to start.

imageThere is an arduino library that is supposed to make communication easier but since the developer of the library did not implement the functionality to get the images out of the sensor it turns out to be useless(ish).
After some searching I found an example sketch for processing which seems more useful as it only uses the arduino to pass on the information sent via serial. the messages look something like this:

byte[] tx_cmd = { 0x55, -86, // packet header (-86 == 0xAA)
0x01, 0x00, // device ID

0x01, 0x00, 0x00, 0x00, // input parameter
0x12, 0x00, // command code
0x13, 0x01 }; // checksum

This turns led on: sofarsogood

Im unsure why the parmeters come in 4s as it only accepts boolean values but using only the first seem to work. The checksum is supposed to be calculated like this:

10

Check Sum

WORD

Check Sum (byte addition) OFFSET[0]+…+OFFSET[9]=Check Sum

Which does not mean anything to me but ATM Im assuming it to be just an addition of the bytes as this seem to work.
The message returns an array of 12 bytes representing a boolean value.

Altering the messages to the corresponding command codes found in the data sheet allows me to:

  • Ask the scanner if a finger is placed.
  • Tell it to take a photo.
  • Tell it to send me the photo.

The latter gives me the YES message but not the photo (data package) itself, which according to arduino forum probably is due to the ram size of the arduino being to small, so I borrow a usb>serial adapter from Corneal to connect the sensor directly to the computer which works better, although I was hoping to use the arduino wirelessly which will have to be figured out in another way.

next steps:

  • Figure out how to translate the data package back to an image to check that what Im receiving is a fingerprint.
  • Translate the data to something more manageable.
  • Figure out what to do with it.

 

processing sketch:

import processing.serial.*;

Serial serial_port;

void setup(){
size(200, 200);

println(Serial.list());
serial_port = new Serial(this, Serial.list()[4], 9600);
}

// switch the fingerprint scanner LED on
void FpsTxLedOn()
{
byte[] tx_cmd = { 0x55, -86, // packet header (-86 == 0xAA)
0x01, 0x00, // device ID
0x01, 0x00, 0x00, 0x00, // input parameter
0x12, 0x00, // command code
0x13, 0x01 }; // checksum

for (int i = 0; i < 12; i++) {
serial_port.write(tx_cmd[i]);
}
}

// switch the fingerprint scanner LED off
void FpsTxLedOff()
{
byte[] tx_cmd = { 0x55, -86, // packet header (-86 == 0xAA)
0x01, 0x00, // device ID
0x00, 0x00, 0x00, 0x00, // input parameter
0x12, 0x00, // command code
0x12, 0x01 }; // checksum

for (int i = 0; i < 12; i++) { serial_port.write(tx_cmd[i]); } } // serial port event handler void serialEvent(Serial p) { byte rx_byte; while (p.available() > 0) {
// get a single character from the serial port
rx_byte = (byte)serial_port.readChar();
println(hex(rx_byte));
}
}

// Prompt is press finger?
void FpsTxIsPressFinger()
{
byte[] tx_cmd = { 0x55, -86, // packet header (-86 == 0xAA)
0x01, 0x00, // device ID
0x01, 0x00, 0x00, 0x00, // input parameter
0x26, 0x00, // command code
0x27, 0x01 }; // checksum

for (int i = 0; i < 12; i++) {
serial_port.write(tx_cmd[i]);
}
} //returns 55-AA-01-00-00-00-00-00-30-00-30-01 is finger is pressed

// Take photo
void FpsTxCapture()
{
byte[] tx_cmd = { 0x55, -86, // packet header (-86 == 0xAA)
0x01, 0x00, // device ID
0x01, 0x00, 0x00, 0x00, // input parameter
0x60, 0x00, // command code
0x61, 0x01 }; // checksum

for (int i = 0; i < 12; i++) {
serial_port.write(tx_cmd[i]);
}
}

// delete All
void FpsTxDeleteAll()
{
byte[] tx_cmd = { 0x55, -86, // packet header (-86 == 0xAA)
0x01, 0x00, // device ID
0x01, 0x00, 0x00, 0x00, // input parameter
0x41, 0x00, // command code
0x42, 0x01 }; // checksum

for (int i = 0; i < 12; i++) {
serial_port.write(tx_cmd[i]);
}
}

// get photo !!! 0 = low quality 1 = higher quality
void FpsTxGetImage()
{
byte[] tx_cmd = { 0x55, -86, // packet header (-86 == 0xAA)
0x01, 0x00, // device ID
0x01, 0x00, 0x00, 0x00, // input parameter
0x62, 0x00, // command code
0x63, 0x01 }; // checksum

for (int i = 0; i < 12; i++) {
serial_port.write(tx_cmd[i]);
}
}

// get photo
void FpsTxGetRawImage()
{
byte[] tx_cmd = { 0x55, -86, // packet header (-86 == 0xAA)
0x01, 0x00, // device ID
0x01, 0x00, 0x00, 0x00, // input parameter
0x63, 0x00, // command code
0x64, 0x01 }; // checksum

for (int i = 0; i < 12; i++) {
serial_port.write(tx_cmd[i]);
}
}

void draw(){
if (keyPressed) {
if (key == 'o' || key == 'O') {
//println("led ON");
FpsTxLedOn();
}
if (key == 'p' || key == 'P') {
//println("led OFF");
FpsTxLedOff();
}
if (key == 'f' || key == 'F') {
FpsTxIsPressFinger();
}
if (key == 'c' || key == 'C') {
FpsTxCapture();
}
if (key == 'd' || key == 'D') {
FpsTxDeleteAll();
}
if (key == 'g' || key == 'G') {
FpsTxGetImage();
}
if (key == 'r' || key == 'R') {
FpsTxGetRawImage();
}
}

}

Published by Hannes Andersson (Lhynkx)

Hannes Andersson is an artist, filmmaker and researcher, born in Gothenburg (Sweden) and currently based in the Netherlands where he is undertaking a MFA in Media, Art, Design and Technology at the Frank Mohr Institute, Minerva Art Academy. Hannes is co-founder of the art collective Chinos International CC, director and co-founder of the independent film group Andersson Rodriguez Films. His artistic work focuses on the relationships between humanity, technology culture and narrative.