Building the EMF bug detector
We are now going to dive into the core of this project and configure the project so that it can detect EMF activity around the antenna.
The following is the complete code for this project:
// Required libraries #include <Wire.h> #include <LiquidCrystal_I2C.h> // Number of readings #define NUMREADINGS 15 // Parameters for the EMF detector int senseLimit = 15; int probePin = 0; int ledPin = 7; int val = 0; int threshold = 200; // Averaging the measurements int readings[NUMREADINGS]; int index = 0; int total = 0 int average = 0; // Time between readings int updateTime = 40; // Create LCD instance LiquidCrystal_I2C lcd(0x27,20,4); void setup() { // Initialise LCD lcd.init(); // Set LED as output pinMode(ledPin, OUTPUT); ...
Get Arduino: Building exciting LED based projects and espionage devices now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.