{"id":1978,"date":"2019-10-28T11:02:45","date_gmt":"2019-10-28T18:02:45","guid":{"rendered":"http:\/\/www.donluc.com\/?p=1978"},"modified":"2022-09-10T14:39:06","modified_gmt":"2022-09-10T21:39:06","slug":"project-11-esp32-feather-emf-meter-mk09","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=1978","title":{"rendered":"Project #11: ESP32 Feather &#8211; EMF Meter &#8211; Mk09"},"content":{"rendered":"<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-1978-1\" width=\"720\" height=\"406\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2019\/10\/dl1910mk01.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2019\/10\/dl1910mk01.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2019\/10\/dl1910mk01.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2019\/10\/DL1910Mk01a.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2019\/10\/DL1910Mk01a.png\" alt=\"EMF Meter\" width=\"720\" height=\"733\" class=\"alignnone size-full wp-image-1981\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2019\/10\/DL1910Mk01a.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2019\/10\/DL1910Mk01a-295x300.png 295w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2019\/10\/DL1910Mk01b.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2019\/10\/DL1910Mk01b.png\" alt=\"EMF Meter\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-1982\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2019\/10\/DL1910Mk01b.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2019\/10\/DL1910Mk01b-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2019\/10\/DL1910Mk01c.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2019\/10\/DL1910Mk01c.png\" alt=\"EMF Meter\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-1983\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2019\/10\/DL1910Mk01c.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2019\/10\/DL1910Mk01c-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>EMF Meter<\/strong><\/p>\n<p>EMF measurements are measurements of ambient electromagnetic fields that are performed using particular sensors or probes, such as EMF meters. These probes can be generally considered as antennas although with different characteristics. In fact probes should not perturb the electromagnetic field and must prevent coupling and reflection as much as possible in order to obtain precise results.<\/p>\n<p>EMF probes may respond to fields only on one axis. Amplified, active, probes can improve measurement precision and sensitivity but their active components may limit their speed of response. <\/p>\n<p><strong>DL1910Mk01<\/strong><\/p>\n<p>1 x Adafruit HUZZAH32 ESP32 Feather<br \/>\n1 x Adafruit SHARP Memory Display<br \/>\n1 x Adafruit Adalogger FeatherWing &#8211; RTC + SD<br \/>\n1 x CR1220 12mm Lithium Battery<br \/>\n1 x 8Gb Micro SD Card<br \/>\n1 x RHT03 Humidity and Temperature Sensor<br \/>\n1 x GPS Receiver GP-20U<br \/>\n1 x LED Green<br \/>\n1 x Rocker Switches<br \/>\n1 x 100 Ohm<br \/>\n1 x 10K Ohm<br \/>\n1 x 3.3M Ohm<br \/>\n1 x Antenna<br \/>\n14 x Jumper Wires 3&#8243; M\/M<br \/>\n6 x Jumper Wires 6&#8243; M\/M<br \/>\n2 x Wire<br \/>\n1 x Full-Size Breadboard<br \/>\n1 x Breadboard<br \/>\n1 x SparkFun Cerberus USB Cable<\/p>\n<p><strong>Adafruit HUZZAH32 ESP32 Feather<\/strong><\/p>\n<p>LG1 &#8211; Digital 21<br \/>\nRO1 &#8211; Digital 16<br \/>\nRHT &#8211; Digital 17<br \/>\nSCK &#8211; Digital 13<br \/>\nMOS &#8211; Digital 12<br \/>\nSSD &#8211; Digital 27<br \/>\nSDA &#8211; Digital 23<br \/>\nSCL &#8211; Digital 22<br \/>\nSD1 &#8211; Digital 33<br \/>\nSC2 &#8211; Digital 5<br \/>\nMO2 &#8211; Digital 18<br \/>\nMI2 &#8211; Digital 19<br \/>\nGPS &#8211; Digital 4<br \/>\nEMF &#8211; Analog A0<br \/>\nGND &#8211; GND<br \/>\nVIN &#8211; +3.3V<\/p>\n<p><strong>DL1910Mk01.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"DL1910Mk01.ino\">\r\n\/\/ ***** Don Luc Electronics *****\r\n\/\/ Software Version Information\r\n\/\/ Project #11: HUZZAH32 ESP32 Feather - EMF - Mk09\r\n\/\/ 10-01\r\n\/\/ DL1910Mk01p.ino 11-09\r\n\/\/ Adafruit HUZZAH32 ESP32 Feather Board\r\n\/\/ SHARP Display\r\n\/\/ LED Green\r\n\/\/ Adalogger FeatherWing - RTC + SD\r\n\/\/ EEPROM\r\n\/\/ RHT03 Humidity and Temperature Sensor\r\n\/\/ Rocker Switches\r\n\/\/ GPS Receiver\r\n\/\/ EMF Meter (Single Axis)\r\n\r\n\/\/ include Library Code\r\n\/\/ SHARP Memory Display\r\n#include &lt;Adafruit_SharpMem.h&gt;\r\n#include &lt;Adafruit_GFX.h&gt;\r\n\/\/ Date and Time\r\n#include &quot;RTClib.h&quot;\r\n\/\/ EEPROM library to read EEPROM with unique ID for unit\r\n#include &quot;EEPROM.h&quot;\r\n\/\/ RHT Humidity and Temperature Sensor\r\n#include &lt;SparkFun_RHT03.h&gt;\r\n\/\/ SD Card\r\n#include &quot;FS.h&quot;\r\n#include &quot;SD.h&quot;\r\n#include &quot;SPI.h&quot;\r\n\/\/ GPS Receiver\r\n#include &lt;TinyGPS++.h&gt;\r\n#include &lt;HardwareSerial.h&gt;\r\n\r\n\/\/ SHARP Memory Display\r\n\/\/ any pins can be used\r\n#define SHARP_SCK  13\r\n#define SHARP_MOSI 12\r\n#define SHARP_SS   27\r\n\/\/ Set the size of the display here, e.g. 144x168!\r\nAdafruit_SharpMem display(SHARP_SCK, SHARP_MOSI, SHARP_SS, 144, 168);\r\n\/\/ The currently-available SHARP Memory Display (144x168 pixels)\r\n\/\/ requires &gt; 4K of microcontroller RAM; it WILL NOT WORK on Arduino Uno\r\n\/\/ or other &lt;4K &quot;classic&quot; devices!\r\n#define BLACK 0\r\n#define WHITE 1\r\nint minorHalfSize; \/\/ 1\/2 of lesser of display width or height\r\n\r\n\/\/ LED Green\r\nint iLEDGreen =  21;                 \/\/ LED Green\r\n\r\n\/\/ PCF8523 Precision RTC \r\nRTC_PCF8523 rtc;\r\nString dateRTC = &quot;&quot;;\r\nString timeRTC = &quot;&quot;;\r\n\r\n\/\/ RHT Humidity and Temperature Sensor\r\nconst int RHT03_DATA_PIN = 17;          \/\/ RHT03 data pin Digital 17\r\nRHT03 rht;                              \/\/ This creates a RTH03 object, which we&#039;ll use to interact with the sensor\r\nfloat latestHumidity;\r\nfloat latestTempC;\r\nfloat latestTempF;\r\n\r\n\/\/ SD Card\r\nconst int chipSelect = 33;              \/\/ SD Card\r\nString zzzzzz = &quot;&quot;;\r\n\r\n\/\/ Rocker Switches\r\nint iRow1 = 16;                         \/\/ Rocker Switches Digital 16\r\nint iRow1State = 0;                     \/\/ Variable for reading the pushbutton status\r\n\r\n\/\/ ESP32 HardwareSerial\r\nHardwareSerial tGPS(2);\r\n\r\n\/\/ GPS Receiver\r\n#define gpsRXPIN 4\r\n#define gpsTXPIN 36                     \/\/ This one is unused and doesnt have a conection\r\n\/\/ The TinyGPS++ object\r\nTinyGPSPlus gps;\r\nfloat TargetLat;\r\nfloat TargetLon;\r\nint Status = 0;\r\n\r\n\/\/ EMF Meter (Single Axis)\r\n#define NUMREADINGS 15                    \/\/ Raise this number to increase data smoothing\r\nint senseLimit = 15;                      \/\/ Raise this number to decrease sensitivity (up to 1023 max)\r\nint val = 0;                              \/\/ Val\r\nint iEMF = A0;                            \/\/ EMF Meter\r\nint readings[ NUMREADINGS ];              \/\/ Readings from the analog input\r\nint ind = 0;                              \/\/ Index of the current reading\r\nint total = 0;                            \/\/ Running total\r\nint average = 0;                          \/\/ Final average of the probe reading\r\nint iEMFDis = 0;\r\nint iEMFRect = 0;\r\n\r\n\/\/ The current address in the EEPROM (i.e. which byte\r\n\/\/ we&#039;re going to  read to next)\r\n#define EEPROM_SIZE 64\r\nString sver = &quot;10-1.p&quot;;\r\n\/\/ Unit ID information\r\nString uid = &quot;&quot;;\r\n\r\nvoid loop() {\r\n\r\n  \/\/ Receives NEMA data from GPS receiver\r\n  \/\/ This sketch displays information every time a new sentence is correctly encoded.\r\n  while ( tGPS.available() &gt; 0)\r\n    if (gps.encode( tGPS.read() ))\r\n    {\r\n     displayInfo();\r\n    }\r\n  \r\n  if (millis() &gt; 5000 &amp;&amp; gps.charsProcessed() &lt; 10)\r\n  {\r\n    while(true);\r\n  }\r\n\r\n  \/\/ Date and Time \r\n  isRTC();\r\n  \r\n  \/\/ RHT03 Humidity and Temperature Sensor\r\n  isRHT03();\r\n  \r\n  \/\/ SHARP Memory Display On\r\n  isDisplayOn();\r\n  \r\n  \/\/ Rocker Switched\r\n  \/\/ Read the state of the iRow1 value\r\n  iRow1State = digitalRead(iRow1);\r\n\r\n  \/\/ EMF Meter (Single Axis)\r\n  isEMF();\r\n\r\n  \/\/ Check if the pushbutton is pressed. If it is, the buttonState is HIGH:\r\n  if (iRow1State == HIGH) {\r\n\r\n    \/\/ iLEDGreen\r\n    digitalWrite(iLEDGreen,  HIGH );\r\n    \/\/ SD Card\r\n    isSD();\r\n\r\n  } else {\r\n\r\n    \/\/ iLEDGreen\r\n    digitalWrite(iLEDGreen,  LOW );\r\n  \r\n  }\r\n   \r\n  \/\/ Delay \r\n  delay( 1000 );\r\n\r\n}\r\n<\/pre>\n<p><strong>getDisplay.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"getDisplay.ino\">\r\n\/\/ SHARP Memory Display On\r\nvoid isDisplayOn() {\r\n\r\n    \/\/ Clear Display\r\n    display.clearDisplay();\r\n    \/\/ text display date, time, LED on\r\n    display.setRotation(4);\r\n    display.setTextSize(2);\r\n    display.setTextColor(BLACK);\r\n    display.setCursor(0,1);\r\n    display.println( dateRTC );\r\n    display.setCursor(0,17);\r\n    display.println( timeRTC );   \r\n    \/\/display.setTextSize(2);    \r\n    display.setCursor(0,35);\r\n    display.print(&quot;Lon: &quot;);\r\n    display.println( TargetLon );\r\n    display.setCursor(0,55);\r\n    display.print(&quot;Lat: &quot;);\r\n    display.println( TargetLat );\r\n    display.setCursor(0,74);\r\n    display.print(&quot;Hum: &quot;);\r\n    display.print( latestHumidity );\r\n    display.println(&quot;%&quot;);\r\n    display.setCursor(0,94);\r\n    display.print(&quot;Cel: &quot;);\r\n    display.print( latestTempC );\r\n    display.println(&quot;*C&quot;);\r\n    display.setCursor(0,114);\r\n    display.print(&quot;EMF: &quot;);\r\n    display.println( iEMFDis );\r\n    display.setCursor(0,134);\r\n    display.setTextSize(1);\r\n    display.println( &quot;0  1 2 3 4 5 6 7 8 9  10&quot; );\r\n    display.setCursor(0,144);\r\n    display.drawRect(0, 144, iEMFRect , display.height(), BLACK);\r\n    display.fillRect(0, 144, iEMFRect , display.height(), BLACK);\r\n    display.refresh();\r\n\r\n}\r\n\/\/ SHARP Memory Display - UID\r\nvoid isDisplayUID() {\r\n\r\n    \/\/ text display EEPROM\r\n    display.setRotation(4);\r\n    display.setTextSize(2);\r\n    display.setTextColor(BLACK);\r\n    display.setCursor(0,20);\r\n    display.print( &quot;UID: &quot; );\r\n    display.println( uid );\r\n   \/\/ display.setTextSize();\r\n    display.setTextColor(BLACK);\r\n    display.setCursor(0,45);\r\n    display.print( &quot;VER: &quot;);\r\n    display.println( sver  );\r\n    display.refresh();\r\n    delay( 100 );\r\n    \r\n}\r\n<\/pre>\n<p><strong>getEEPROM.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"getEEPROM.ino\">\r\n\/\/ EEPROM\r\nvoid GetUID()\r\n{\r\n  \r\n  \/\/ Get unit ID\r\n  uid = &quot;&quot;;\r\n  for (int x = 0; x &lt; 5; x++)\r\n  {\r\n    uid = uid + char(EEPROM.read(x));\r\n  }\r\n  \r\n}\r\n<\/pre>\n<p><strong>getEMF.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"getEMF.ino\">\r\n\/\/ EMF Meter (Single Axis)\r\n\/\/ setupEMF\r\nvoid setupEMF() {\r\n\r\n  \/\/ EMF Meter (Single Axis)\r\n  pinMode( iEMF, OUTPUT ); \/\/ EMF Meter\r\n  for (int i = 0; i &lt; NUMREADINGS; i++){\r\n    readings[ i ] = 0;     \/\/ Initialize all the readings to 0\r\n  }\r\n  \r\n}\r\n\/\/ isEMF\r\nvoid isEMF(){\r\n\r\n  \/\/ Probe\r\n  val = analogRead( iEMF );                    \/\/ Take a reading from the probe\r\n  \r\n  if( val &gt;= 1 ){                              \/\/ If the reading isn&#039;t zero, proceed\r\n\r\n    val = constrain( val, 1, senseLimit );     \/\/ Turn any reading higher than the senseLimit value into the senseLimit value\r\n    val = map( val, 1, senseLimit, 1, 1023 );  \/\/ Remap the constrained value within a 1 to 1023 range\r\n\r\n    total -= readings[ ind ];                  \/\/ Subtract the last reading\r\n    readings[ ind ] = val;                     \/\/ Read from the sensor\r\n    total += readings[ ind ];                  \/\/ Add the reading to the total\r\n    ind = ( ind + 1 );                         \/\/ Advance to the next index\r\n\r\n    if ( ind &gt;= NUMREADINGS ) {                \/\/ If we&#039;re at the end of the array...\r\n      ind = 0;                                 \/\/ ...wrap around to the beginning\r\n    }  \r\n\r\n    average = total \/ NUMREADINGS;             \/\/ Calculate the average\r\n\r\n  }\r\n  else\r\n  {\r\n      \r\n    iEMFRect = 0;\r\n    val = 0;\r\n    average = 0;\r\n    \r\n  }\r\n\r\n  iEMFDis = average;\r\n  iEMFRect = map( average, 1, 1023, 1, 144 );\r\n    \r\n}\r\n<\/pre>\n<p><strong>getGPS.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"getGPS.ino\">\r\n\/\/ GPS Receiver\r\nvoid setupGPS() {\r\n\r\n  \/\/ Setup GPS\r\n  tGPS.begin(  9600 , SERIAL_8N1, gpsRXPIN, gpsTXPIN );\r\n  \r\n}\r\n\/\/ GPS Vector Pointer Target\r\nvoid displayInfo()\r\n{\r\n\r\n  \/\/ Location\r\n  if (gps.location.isValid())\r\n  {\r\n    \r\n    TargetLat = gps.location.lat();\r\n    TargetLon = gps.location.lng();\r\n    Status = 2;\r\n    \r\n  }\r\n  else\r\n  {\r\n\r\n    Status = 0;\r\n    \r\n  }\r\n\r\n}\r\n<\/pre>\n<p><strong>getRHT.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"getRHT.ino\">\r\n\/\/ RHT03 Humidity and Temperature Sensor\r\nvoid isRHT03(){\r\n\r\n  \/\/ Call rht.update() to get new humidity and temperature values from the sensor.\r\n  int updateRet = rht.update();\r\n\r\n  \/\/ The humidity(), tempC(), and tempF() functions can be called -- after \r\n  \/\/ a successful update() -- to get the last humidity and temperature value \r\n  latestHumidity = rht.humidity();\r\n  latestTempC = rht.tempC();\r\n  latestTempF = rht.tempF();\r\n  \r\n}\r\n<\/pre>\n<p><strong>getRTCpcf8523.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"getRTCpcf8523.ino\">\r\n\/\/ PCF8523 Precision RTC \r\nvoid setupRTC() {\r\n\r\n  \/\/ pcf8523 Precision RTC   \r\n  if (! rtc.begin()) {\r\n    while (1);\r\n  }  \r\n  if (! rtc.initialized()) {\r\n    \/\/ Following line sets the RTC to the date &amp; time this sketch was compiled\r\n    rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));\r\n    \/\/ This line sets the RTC with an explicit date &amp; time, for example to set\r\n    \/\/ January 21, 2014 at 3am you would call:\r\n    \/\/ rtc.adjust(DateTime(2018, 9, 29, 12, 17, 0));\r\n  }\r\n  \r\n}\r\n\/\/ Date and Time RTC\r\nvoid isRTC () {\r\n\r\n  \/\/ Date and Time\r\n  DateTime now = rtc.now();\r\n  \/\/ Date\r\n  dateRTC = now.year(), DEC; \r\n  dateRTC = dateRTC + &quot;\/&quot;;\r\n  dateRTC = dateRTC + now.month(), DEC;\r\n  dateRTC = dateRTC + &quot;\/&quot;;\r\n  dateRTC = dateRTC + now.day(), DEC;\r\n  \/\/ Time\r\n  timeRTC = now.hour(), DEC;\r\n  timeRTC = timeRTC + &quot;:&quot;;\r\n  timeRTC = timeRTC + now.minute(), DEC;\r\n  timeRTC = timeRTC + &quot;:&quot;;\r\n  timeRTC = timeRTC + now.second(), DEC;\r\n  \r\n}\r\n<\/pre>\n<p><strong>getSD.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"getSD.ino\">\r\n\/\/ SD Card\r\nvoid setupSD() {\r\n\r\n  \/\/ SD Card\r\n    pinMode( chipSelect , OUTPUT );\r\n    if(!SD.begin( chipSelect )){\r\n        ;  \r\n        return;\r\n    }\r\n    uint8_t cardType = SD.cardType();\r\n\r\n    if(cardType == CARD_NONE){\r\n        ; \r\n        return;\r\n    }\r\n\r\n    \/\/Serial.print(&quot;SD Card Type: &quot;);\r\n    if(cardType == CARD_MMC){\r\n        ; \r\n    } else if(cardType == CARD_SD){\r\n        ; \r\n    } else if(cardType == CARD_SDHC){\r\n        ; \r\n    } else {\r\n        ; \r\n    } \r\n\r\n    uint64_t cardSize = SD.cardSize() \/ (1024 * 1024);\r\n  \r\n}\r\n\/\/ SD Card\r\nvoid isSD() {\r\n\r\n  zzzzzz = &quot;&quot;;\r\n\r\n  zzzzzz = uid + &quot;|&quot; + sver + &quot;|&quot; + dateRTC + &quot;|&quot; + timeRTC + &quot;|&quot; + Status + &quot;|&quot; + TargetLon + &quot;|&quot; + TargetLat + &quot;|&quot; + latestHumidity + &quot;|&quot; + latestTempC + &quot;|&quot; + latestTempF + &quot;|&quot; + average + &quot;|\\r&quot;;\r\n\r\n  char msg[zzzzzz.length() + 1];\r\n\r\n  zzzzzz.toCharArray(msg, zzzzzz.length() + 1);\r\n\r\n  appendFile(SD, &quot;\/espdata.txt&quot;, msg );\r\n  \r\n}\r\n\/\/ List Dir\r\nvoid listDir(fs::FS &amp;fs, const char * dirname, uint8_t levels){\r\n    dirname;\r\n    File root = fs.open(dirname);\r\n    if(!root){\r\n        return;\r\n    }\r\n    if(!root.isDirectory()){\r\n        return;\r\n    }\r\n\r\n    File file = root.openNextFile();\r\n    while(file){\r\n        if(file.isDirectory()){\r\n            file.name();\r\n            if(levels){\r\n                listDir(fs, file.name(), levels -1);\r\n            }\r\n        } else {\r\n            file.name();\r\n            file.size();\r\n        }\r\n        file = root.openNextFile();\r\n    }\r\n}\r\n\/\/ Write File\r\nvoid writeFile(fs::FS &amp;fs, const char * path, const char * message){\r\n    path;\r\n    File file = fs.open(path, FILE_WRITE);\r\n    if(!file){\r\n        return;\r\n    }\r\n    if(file.print(message)){\r\n        ;  \r\n    } else {\r\n        ;  \r\n    }\r\n    file.close();\r\n}\r\n\/\/ Append File\r\nvoid appendFile(fs::FS &amp;fs, const char * path, const char * message){\r\n    \/\/Serial.printf(&quot;Appending to file: %s\\n&quot;, path);\r\n    path;\r\n    File file = fs.open(path, FILE_APPEND);\r\n    if(!file){\r\n        return;\r\n    }\r\n    if(file.print(message)){\r\n        ;  \r\n    } else {\r\n        ;  \r\n    }\r\n    file.close();\r\n}\r\n<\/pre>\n<p><strong>setup.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"setup.ino\">\r\n\/\/ Setup\r\nvoid setup() {\r\n\r\n  \/\/ EEPROM with unique ID\r\n  EEPROM.begin(EEPROM_SIZE);\r\n   \r\n  \/\/ Get Unit ID\r\n  GetUID();\r\n\r\n  \/\/ GPS Receiver\r\n  \/\/ Setup GPS\r\n  setupGPS();\r\n  \r\n  \/\/ SHARP Display start &amp; clear the display\r\n  display.begin();\r\n  display.clearDisplay();\r\n\r\n  isDisplayUID();\r\n\r\n  delay( 5000 );\r\n  \r\n  \/\/ Initialize the LED Green\r\n  pinMode(iLEDGreen, OUTPUT);\r\n\r\n  \/\/ PCF8523 Precision RTC \r\n  setupRTC();\r\n\r\n  \/\/ Date and Time RTC\r\n  isRTC();\r\n\r\n  \/\/ RHT03 Humidity and Temperature Sensor\r\n  \/\/ Call rht.begin() to initialize the sensor and our data pin\r\n  rht.begin(RHT03_DATA_PIN);\r\n\r\n  \/\/ SD Card\r\n  setupSD();\r\n\r\n  \/\/ Rocker Switches\r\n  pinMode(iRow1, INPUT);\r\n\r\n  \/\/ EMF Meter (Single Axis)\r\n  setupEMF();\r\n\r\n}\r\n<\/pre>\n<p><strong>Follow Us<\/strong><\/p>\n<p><strong>Web:<\/strong> https:\/\/www.donluc.com\/<br \/>\n<strong>Web:<\/strong> http:\/\/neosteamlabs.com\/<br \/>\n<strong>Web:<\/strong> http:\/\/www.jlpconsultants.com\/<br \/>\n<strong>YouTube:<\/strong> https:\/\/www.youtube.com\/channel\/UC5eRjrGn1CqkkGfZy0jxEdA<br \/>\n<strong>Facebook:<\/strong> https:\/\/www.facebook.com\/neosteam.labs.9\/<br \/>\n<strong>Instagram:<\/strong> https:\/\/www.instagram.com\/neosteamlabs\/<br \/>\n<strong>Pinterest:<\/strong> https:\/\/www.pinterest.com\/NeoSteamLabs\/<br \/>\n<strong>Twitter:<\/strong> https:\/\/twitter.com\/labs_steam<br \/>\n<strong>Etsy:<\/strong> https:\/\/www.etsy.com\/shop\/NeoSteamLabs<\/p>\n<p><strong>Don Luc<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; EMF Meter EMF measurements are measurements of ambient electromagnetic fields that are performed using particular sensors or probes, such as EMF meters. These probes can be generally considered as antennas although with different characteristics. In fact probes should not perturb the electromagnetic field and must prevent coupling and reflection as much &#8230; <a title=\"Project #11: ESP32 Feather &#8211; EMF Meter &#8211; Mk09\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=1978\" aria-label=\"Read more about Project #11: ESP32 Feather &#8211; EMF Meter &#8211; Mk09\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[81,47,38,78,59,5,82,10],"tags":[86,6,87,91,83,85,89,24,9,84,27,34],"class_list":["post-1978","post","type-post","status-publish","format-standard","hentry","category-esp32-project","category-adafruit","category-digitalelectronics","category-esp8266-microcontrollers","category-fritzing","category-microcontrollers","category-program-esp32","category-projects","tag-adafruit","tag-arduino","tag-display","tag-emf-meter","tag-esp32","tag-fritzing","tag-gps-receiver","tag-microcontroller","tag-programming","tag-programming-esp32","tag-projects-2","tag-video-blog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/1978","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1978"}],"version-history":[{"count":4,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/1978\/revisions"}],"predecessor-version":[{"id":3502,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/1978\/revisions\/3502"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1978"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1978"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1978"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}