Signal: killed Compilation error: signal: killed

Helllo!

I am getting a weird error message when I am using my Arduino Nano with a Mac on Monterey. Here is the message,

signal: killed

Compilation error: signal: killed

What could this mean? Is it my code, computer, board, connections, or a combination of them? I am programming a fingerprint sensor to open a solenoid valve, and the fingerprint sensor is not being recognized by the computer. Here is my code,

222/***************************************************
  This is an example sketch for our optical Fingerprint sensor

  Designed specifically to work with the Adafruit BMP085 Breakout
  ----> http://www.adafruit.com/products/751

  These displays use TTL Serial to communicate, 2 pins are required to
  interface
  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.
  BSD license, all text above must be included in any redistribution
 ****************************************************/


#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>
#include<stdint.h> 

int getFingerprintIDez();

int pinRelay = 12;
int pinFPS = 8;
int count = 0;


#if (defined(__AVR__) || defined(ESP8266)) && !defined(__AVR_ATmega2560__)
// For UNO and others without hardware serial, we must use software serial...
// pin #2 is IN from sensor (GREEN wire)
// pin #3 is OUT from arduino  (WHITE wire)
// Set up the serial port to use softwareserial..
SoftwareSerial mySerial(2, 3);

#else
// On Leonardo/M0/etc, others with hardware serial, use hardware serial!
// #0 is green wire, #1 is white
#define mySerial Serial1

#endif


Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

void setup()
{
  Serial.begin(9600);
  while (!Serial);  // For Yun/Leo/Micro/Zero/...
  delay(100);
  Serial.println("\n\nAdafruit finger detect test");

  pinMode(pinRelay, OUTPUT);
  pinMode(pinFPS, OUTPUT);

  digitalWrite(pinFPS, HIGH);

  // set the data rate for the sensor serial port
  finger.begin(57600);
  delay(5);
  if (finger.verifyPassword()) {
    Serial.println("Found fingerprint sensor!");
  } else {
    Serial.println("Did not find fingerprint sensor :(");
    while (1) { delay(1); }
  }

  Serial.println(F("Reading sensor parameters"));
  finger.getParameters();
  Serial.print(F("Status: 0x")); Serial.println(finger.status_reg, HEX);
  Serial.print(F("Sys ID: 0x")); Serial.println(finger.system_id, HEX);
  Serial.print(F("Capacity: ")); Serial.println(finger.capacity);
  Serial.print(F("Security level: ")); Serial.println(finger.security_level);
  Serial.print(F("Device address: ")); Serial.println(finger.device_addr, HEX);
  Serial.print(F("Packet len: ")); Serial.println(finger.packet_len);
  Serial.print(F("Baud rate: ")); Serial.println(finger.baud_rate);

  finger.getTemplateCount();

  if (finger.templateCount == 0) {
    Serial.print("Sensor doesn't contain any fingerprint data. Please run the 'enroll' example.");
  }
  else {
    Serial.println("Waiting for valid finger...");
      Serial.print("Sensor contains "); Serial.print(finger.templateCount); Serial.println(" templates");
  }
}
void loop()
{
  getFingerprintIDez();
  delay(50);

  Serial.print("Awake for ");
  Serial.print(count);
  Serial.println("sec");
  count++;
  delay(1000);

  if (Serial.available()) {
    int serialData = Serial.read();
    if (serialData == 'Serial')
    {
      Serial.println("Serial: No finger detected");
      delay(100);
      count = 0;
    }
  }
  if (count >= 10) {
    Serial.println("FPS in sleep Mode");
    delay(100);
    count = 0;
    digitalWrite(pinFPS,LOW);
    
  }
}


uint8_t getFingerprintID() {
  uint8_t p = finger.getImage();
  switch (p) {
    case FINGERPRINT_OK:
      Serial.println("Image taken");
      break;
    case FINGERPRINT_NOFINGER:
      Serial.println("No finger detected");
      return p;
    case FINGERPRINT_PACKETRECIEVEERR:
      Serial.println("Communication error");
      return p;
    case FINGERPRINT_IMAGEFAIL:
      Serial.println("Imaging error");
      return p;
    default:
      Serial.println("Unknown error");
      return p;
  }

  // OK success!

  p = finger.image2Tz();
  switch (p) {
    case FINGERPRINT_OK:
      Serial.println("Image converted");
      break;
    case FINGERPRINT_IMAGEMESS:
      Serial.println("Image too messy");
      return p;
    case FINGERPRINT_PACKETRECIEVEERR:
      Serial.println("Communication error");
      return p;
    case FINGERPRINT_FEATUREFAIL:
      Serial.println("Could not find fingerprint features");
      return p;
    case FINGERPRINT_INVALIDIMAGE:
      Serial.println("Could not find fingerprint features");
      return p;
    default:
      Serial.println("Unknown error");
      return p;
  }

  // OK converted!
  p = finger.fingerSearch();
  if (p == FINGERPRINT_OK) {
    Serial.println("Found a print match!");
  } else if (p == FINGERPRINT_PACKETRECIEVEERR) {
    Serial.println("Communication error");
    return p;
  } else if (p == FINGERPRINT_NOTFOUND) {
    Serial.println("Did not find a match");
    return p;
  } else {
    Serial.println("Unknown error");
    return p;
  }

  // found a match!
  Serial.print("Found ID #"); Serial.print(finger.fingerID);
  Serial.print(" with confidence of "); Serial.println(finger.confidence);
  digitalWrite(pinRelay, HIGH);
  delay(3000);
  digitalWrite(pinRelay, LOW);
  return finger.fingerID;
}

// returns -1 if failed, otherwise returns ID #
int getFingerprintIDez() {
  uint8_t p = finger.getImage();
  if (p != FINGERPRINT_OK)  return -1;

  p = finger.image2Tz();
  if (p != FINGERPRINT_OK)  return -1;

  p = finger.fingerFastSearch();
  if (p != FINGERPRINT_OK)  return -1;

  // found a match!
  Serial.print("Found ID #"); Serial.print(finger.fingerID);
  Serial.print(" with confidence of "); Serial.println(finger.confidence);
  digitalWrite(pinRelay, HIGH);
  delay(3000);
  digitalWrite(pinRelay, LOW);
  return finger.fingerID;
}

Thank you for the help and have a great day.

It is not a full message.
Please show the message exactly as you get it.

Hi,
Have you tried compiling a simple example code like, "Blink without delay" to see if you get the same error?

The sketch you posted, says it is an example sketch, have you modified it, if so can I suggest you try the original.

Not sure what the 222 is for.

222/***************************************************
  This is an example sketch for our optical Fingerprint sensor

Tom.. :smiley: :+1: :coffee: :australia:

I am using Arduino v2.0.0 with an Arduino Nano and I am getting this error message.

signal: killed

Compilation error: signal: killed

Is there something wrong with my board, computer, code, components, or all of the above. Here is my code,

222/***************************************************
  This is an example sketch for our optical Fingerprint sensor

  Designed specifically to work with the Adafruit BMP085 Breakout
  ----> http://www.adafruit.com/products/751

  These displays use TTL Serial to communicate, 2 pins are required to
  interface
  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.
  BSD license, all text above must be included in any redistribution
 ****************************************************/


#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>
#include<stdint.h> 

int getFingerprintIDez();

int pinRelay = 12;
int pinFPS = 8;
int count = 0;


#if (defined(__AVR__) || defined(ESP8266)) && !defined(__AVR_ATmega2560__)
// For UNO and others without hardware serial, we must use software serial...
// pin #2 is IN from sensor (GREEN wire)
// pin #3 is OUT from arduino  (WHITE wire)
// Set up the serial port to use softwareserial..
SoftwareSerial mySerial(2, 3);

#else
// On Leonardo/M0/etc, others with hardware serial, use hardware serial!
// #0 is green wire, #1 is white
#define mySerial Serial1

#endif


Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

void setup()
{
  Serial.begin(9600);
  while (!Serial);  // For Yun/Leo/Micro/Zero/...
  delay(100);
  Serial.println("\n\nAdafruit finger detect test");

  pinMode(pinRelay, OUTPUT);
  pinMode(pinFPS, OUTPUT);

  digitalWrite(pinFPS, HIGH);

  // set the data rate for the sensor serial port
  finger.begin(57600);
  delay(5);
  if (finger.verifyPassword()) {
    Serial.println("Found fingerprint sensor!");
  } else {
    Serial.println("Did not find fingerprint sensor :(");
    while (1) { delay(1); }
  }

  Serial.println(F("Reading sensor parameters"));
  finger.getParameters();
  Serial.print(F("Status: 0x")); Serial.println(finger.status_reg, HEX);
  Serial.print(F("Sys ID: 0x")); Serial.println(finger.system_id, HEX);
  Serial.print(F("Capacity: ")); Serial.println(finger.capacity);
  Serial.print(F("Security level: ")); Serial.println(finger.security_level);
  Serial.print(F("Device address: ")); Serial.println(finger.device_addr, HEX);
  Serial.print(F("Packet len: ")); Serial.println(finger.packet_len);
  Serial.print(F("Baud rate: ")); Serial.println(finger.baud_rate);

  finger.getTemplateCount();

  if (finger.templateCount == 0) {
    Serial.print("Sensor doesn't contain any fingerprint data. Please run the 'enroll' example.");
  }
  else {
    Serial.println("Waiting for valid finger...");
      Serial.print("Sensor contains "); Serial.print(finger.templateCount); Serial.println(" templates");
  }
}
void loop()
{
  getFingerprintIDez();
  delay(50);

  Serial.print("Awake for ");
  Serial.print(count);
  Serial.println("sec");
  count++;
  delay(1000);

  if (Serial.available()) {
    int serialData = Serial.read();
    if (serialData == 'Serial')
    {
      Serial.println("Serial: No finger detected");
      delay(100);
      count = 0;
    }
  }
  if (count >= 10) {
    Serial.println("FPS in sleep Mode");
    delay(100);
    count = 0;
    digitalWrite(pinFPS,LOW);
    
  }
}


uint8_t getFingerprintID() {
  uint8_t p = finger.getImage();
  switch (p) {
    case FINGERPRINT_OK:
      Serial.println("Image taken");
      break;
    case FINGERPRINT_NOFINGER:
      Serial.println("No finger detected");
      return p;
    case FINGERPRINT_PACKETRECIEVEERR:
      Serial.println("Communication error");
      return p;
    case FINGERPRINT_IMAGEFAIL:
      Serial.println("Imaging error");
      return p;
    default:
      Serial.println("Unknown error");
      return p;
  }

  // OK success!

  p = finger.image2Tz();
  switch (p) {
    case FINGERPRINT_OK:
      Serial.println("Image converted");
      break;
    case FINGERPRINT_IMAGEMESS:
      Serial.println("Image too messy");
      return p;
    case FINGERPRINT_PACKETRECIEVEERR:
      Serial.println("Communication error");
      return p;
    case FINGERPRINT_FEATUREFAIL:
      Serial.println("Could not find fingerprint features");
      return p;
    case FINGERPRINT_INVALIDIMAGE:
      Serial.println("Could not find fingerprint features");
      return p;
    default:
      Serial.println("Unknown error");
      return p;
  }

  // OK converted!
  p = finger.fingerSearch();
  if (p == FINGERPRINT_OK) {
    Serial.println("Found a print match!");
  } else if (p == FINGERPRINT_PACKETRECIEVEERR) {
    Serial.println("Communication error");
    return p;
  } else if (p == FINGERPRINT_NOTFOUND) {
    Serial.println("Did not find a match");
    return p;
  } else {
    Serial.println("Unknown error");
    return p;
  }

  // found a match!
  Serial.print("Found ID #"); Serial.print(finger.fingerID);
  Serial.print(" with confidence of "); Serial.println(finger.confidence);
  digitalWrite(pinRelay, HIGH);
  delay(3000);
  digitalWrite(pinRelay, LOW);
  return finger.fingerID;
}

// returns -1 if failed, otherwise returns ID #
int getFingerprintIDez() {
  uint8_t p = finger.getImage();
  if (p != FINGERPRINT_OK)  return -1;

  p = finger.image2Tz();
  if (p != FINGERPRINT_OK)  return -1;

  p = finger.fingerFastSearch();
  if (p != FINGERPRINT_OK)  return -1;

  // found a match!
  Serial.print("Found ID #"); Serial.print(finger.fingerID);
  Serial.print(" with confidence of "); Serial.println(finger.confidence);
  digitalWrite(pinRelay, HIGH);
  delay(3000);
  digitalWrite(pinRelay, LOW);
  return finger.fingerID;
}

Thank you for the help.

@jsb10

  1. Did you ever manage to compile/upload a sketch to this board?
  2. If you have other Arduinos, does it also happen?
  3. Which exact Nano do you have? Genuine or clone? There are nowadays different Nanos (e.g. Nano, Nano Every, various Nano 33); I'm just trying to make sure that we're talking about the same one.
  4. Which operating system?
  5. Does the same error show when e.g. uploading blink?
  6. If you have an older version of the IDE installed, does it also hapoen there?
  7. Please post the full error output. Right click in the output window, click copy all and paste it here using code tags (the </> button)

@jsb10,

Welcome to the forum.
I have split the posts you made on another topic and added them to the end of your topic. Please do not add your questions to the end of a different topic and please post your question once only.

Please take some time to read the forum guide: How to get the best out of this forum

Thank you.

Hi @TomGeorge

I used an example code from Adafruit Fingerprint Sensor Library. It was called Fingerprint, and I edited it to work with the Solenoid, and to send a signal to the pin it was connected to. The code worked on a privies version of this build, with a Uno, and for a little while it has worked with the Nano. but it suddenly stopped. Should I use the the original Fingerprint code from the library? Thanks and have a great day.

Here is the library I used: Release 2.1.0 - Added write register instructions · adafruit/Adafruit-Fingerprint-Sensor-Library · GitHub

It is also available on the included library manger in the Arduino IDE.

Hi @sterretje ,

To Answer your questions,

  1. Yes, I have been able to get this program on this board, it just suddenly started giving me error messages a couple of days ago.
  2. I do have a Uno and 2 other Nanos, the Uno I got it to work with this code, but with different components and circuitry.
  3. I just have the normal blue Arduino Nano, here is the link I bought it from.
  4. Everyone keeps telling me to use "Blink", what is it and what does it do to help me?
  5. I am running macOS Monterey 12.5 on a early 2015 MacBook Air.
  6. I am running 2.0.0 currently, but on 1.8.19 it does work.
  7. Here is the output,

signal: killed

Compilation error: signal: killed

Thanks, have a great day.

Hi @b707,

That is the only thing that pops up when I upload the code. Here is a screenshot of what it says,

Thanks, have a great day.

Hi, @jsb10

Yes, try loading the original, it will then let you see if it is a coding fault or Arduino V2.0.0,

OR
Try the PC based IDE Arduino 1.8.19 or there bouts, the 2.0.0 is under development and the PC version would be more stable.

Tom.. :smiley: :+1: :coffee: :australia:
PS. Did you get rid of the "222" on the first line of your code?

It's strange as there does not seem to be much logic that could identify the issue.

One observation:
In the screenshot in post #9 you have the serial monitor open. Although this is not likely the cause, there was a bug in one of the release candidates that prevented uploads while the serial monitor was open; it should have been fixed in 2.0 but you could check if the issue is still present if you close the serial monitor.

What I forgot to ask
Does this happen when you try to upload or does it also happen when you only try to compile (verify).

With the exact same components? Please draw a schematic how everything is connected and drop it here in a post (not on google drive)?
And with exactly the same code? Or was it a newer version.

That might indicate a hardware issue with your Nano / components. What happens if you use the same components on the Nano that you use for the Uno?

Blink is one of the built-in examples that blinks the built-in LED. The question is asked to determine if this relates to your code (and libraries) or to the board / components.

So first try to upload blink() while everything is connected. If that fails, disconnect all external components and try to upload again. Please report back if (and where) it fails

If that's exactly (!) the same code it would indicate a problem in IDE 2.0. I'm not familiar with a Mac and have no idea where to look for the logs.

If we can't figure it out, I suggest that you (for this project) stick to IDE 1.8.19.

Hi everyone!

I was doing a little more testing, and it seems that updating my IDE to 2.0.1 worked. Thank you for all the help! I will come back if I have any more problems. Have a great day.

JSB10

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.