Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Arduino for Secret Agents

You're reading from   Arduino for Secret Agents Transform your tiny Arduino device into a secret agent gadget to build a range of espionage projects with this practical guide for hackers

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher
ISBN-13 9781783986088
Length 170 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Marco Schwartz Marco Schwartz
Author Profile Icon Marco Schwartz
Marco Schwartz
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Arduino for Secret Agents
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. A Simple Alarm System with Arduino FREE CHAPTER 2. Creating a Spy Microphone 3. Building an EMF Bug Detector 4. Access Control with a Fingerprint Sensor 5. Opening a Lock with an SMS 6. Building a Cloud Spy Camera 7. Monitoring Secret Data from Anywhere 8. Creating a GPS Tracker with Arduino 9. Building an Arduino Spy Robot Index

Controlling access to the relay


Now that your fingerprint is stored in the sensor, you can build your first application using the hardware that we previously built. We are going to open or close the relay every time the sensor recognizes our fingerprint. The following is the complete code for this part, excluding the details about recognition functions:

// Libraries
#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>

// Function to get fingerprint
int getFingerprintIDez();

// Init Software Serial
SoftwareSerial mySerial(2, 3);

// Fingerprint sensor instance
Adafruit_Fingerprint finger = Adafruit_Fingerprint(andmySerial);

// Relay parameters
int relayPin = 7;
bool relayState = false;

// Your stored finger ID
int fingerID = 0;

// Counters
int activationCounter = 0;
int lastActivation = 0;

void setup() 
{

  // Start Serial
  Serial.begin(9600);

  // Set the data rate for the sensor serial port
  finger.begin(57600);

  // Check if sensor is present
  if (finger...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images