{"id":1614,"date":"2018-06-12T14:01:05","date_gmt":"2018-06-12T21:01:05","guid":{"rendered":"http:\/\/www.donluc.com\/?p=1614"},"modified":"2018-06-12T14:01:05","modified_gmt":"2018-06-12T21:01:05","slug":"project-6-microview-emf-meter-single-axis-mk08","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=1614","title":{"rendered":"Project #6: MicroView &#8211; EMF Meter (Single Axis) &#8211; Mk08"},"content":{"rendered":"<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01b.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01b.png\" alt=\"\" width=\"720\" height=\"449\" class=\"alignnone size-full wp-image-1615\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01b.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01b-300x187.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01c.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01c.png\" alt=\"\" width=\"720\" height=\"935\" class=\"alignnone size-full wp-image-1616\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01c.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01c-231x300.png 231w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01d.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01d.png\" alt=\"\" width=\"720\" height=\"540\" class=\"alignnone size-full wp-image-1617\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01d.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01d-300x225.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01e.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01e.png\" alt=\"\" width=\"720\" height=\"540\" class=\"alignnone size-full wp-image-1618\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01e.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01e-300x225.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p><strong>Electromagnetic Field<\/strong><\/p>\n<p>An electromagnetic field (also EMF or EM field) is a physical field produced by electrically charged objects. It affects the behavior of charged objects in the vicinity of the field. The electromagnetic field extends indefinitely throughout space and describes the electromagnetic interaction. It is one of the four fundamental forces of nature (the others are gravitation, weak interaction and strong interaction).<\/p>\n<p>The field can be viewed as the combination of an electric field and a magnetic field. The electric field is produced by stationary charges, and the magnetic field by moving charges (currents); these two are often described as the sources of the field. The way in which charges and currents interact with the electromagnetic field is described by Maxwell&#8217;s equations and the Lorentz force law. The force created by the electric field is much stronger than the force created by the magnetic field.<\/p>\n<p>From a classical perspective in the history of electromagnetism, the electromagnetic field can be regarded as a smooth, continuous field, propagated in a wavelike manner; whereas from the perspective of quantum field theory, the field is seen as quantized, being composed of individual particles.<\/p>\n<p><strong>EMF Measurement<\/strong><\/p>\n<p>EMF measurements are measurements of ambient (surrounding) 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. There are two main types of EMF measurements:<\/p>\n<p>* Broadband measurements performed using a broadband probe, that is a device which senses any signal across a wide range of frequencies and is usually made with three independent diode detectors;<br \/>\n* Frequency selective measurements in which the measurement system consists of a field antenna and a frequency selective receiver or spectrum analyzer allowing to monitor the frequency range of interest.<\/p>\n<p>EMF probes may respond to fields only on one axis, or may be tri-axial, showing components of the field in three directions at once. Amplified, active, probes can improve measurement precision and sensitivity but their active components may limit their speed of response.<\/p>\n<p><strong>EMF Meters<\/strong><\/p>\n<p>An EMF meter is a scientific instrument for measuring electromagnetic fields (abbreviated as EMF). Most meters measure the electromagnetic radiation flux density (DC fields) or the change in an electromagnetic field over time (AC fields), essentially the same as a radio antenna, but with quite different detection characteristics.<\/p>\n<p>The two largest categories are single axis and tri-axis. Single axis meters are cheaper than tri-axis meters, but take longer to complete a survey because the meter only measures one dimension of the field. Single axis instruments have to be tilted and turned on all three axes to obtain a full measurement. A tri-axis meter measures all three axes simultaneously, but these models tend to be more expensive.<\/p>\n<p>Electromagnetic fields can be generated by AC or DC currents. An EMF meter can measure AC electromagnetic fields, which are usually emitted from man-made sources such as electrical wiring, while gaussmeters or magnetometers measure DC fields, which occur naturally in Earth&#8217;s geomagnetic field and are emitted from other sources where direct current is present.<\/p>\n<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-1614-1\" width=\"720\" height=\"406\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01a.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01a.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01a.mp4<\/a><\/video><\/div>\n<p><strong>EMF Meter (Single Axis)<\/strong><\/p>\n<p> 1 x MicroView<br \/>\n 1 x MicroView &#8211; USB Programmer<br \/>\n 1 x DS18S20<br \/>\n 1 x NeoPixel Stick &#8211; 8 x 5050 RGB LED<br \/>\n 1 x Speaker<br \/>\n 1 x LED Red<br \/>\n 1 x LED Green<br \/>\n 1 x LED Yellow<br \/>\n 1 x 330 Ohm<br \/>\n 1 x 1.5k Ohm<br \/>\n 1 x 3.3M Ohm<br \/>\n 1 x 3&#8243; Wire Solid Core, 22 AWG<br \/>\n 1 x 4 Header<br \/>\n20 x Jumper Wires 3&#8243; M\/M<br \/>\n 1 x Half-Size Breadboard<br \/>\n 1 x Battery Holder 3xAAA with Cover and Switch<br \/>\n 3 x Battery AAA<\/p>\n<p><strong>MicroView<\/strong><\/p>\n<p>WIRE &#8211; PIN 02 &#8211; Analog A5<br \/>\nGND  &#8211; PIN 08 &#8211; GND<br \/>\nVIN  &#8211; PIN 15 &#8211; +5V<br \/>\nTEM  &#8211; PIN 14 &#8211; Digital 5<br \/>\nSPE  &#8211; PIN 13 &#8211; Digital 4<br \/>\nNEO  &#8211; PIN 12 &#8211; Digital 3<br \/>\nLEDG &#8211; PIN 11 &#8211; Digital 2<br \/>\nLEDY &#8211; PIN 10 &#8211; Digital 1<br \/>\nLEDR &#8211; PIN 09 &#8211; Digital 0<\/p>\n<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-1614-2\" width=\"720\" height=\"406\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01b.mp4?_=2\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01b.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01b.mp4<\/a><\/video><\/div>\n<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-1614-3\" width=\"720\" height=\"406\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01c.mp4?_=3\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01c.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01c.mp4<\/a><\/video><\/div>\n<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-1614-4\" width=\"720\" height=\"406\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01d.mp4?_=4\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01d.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01d.mp4<\/a><\/video><\/div>\n<p><strong>DonLuc1806Mk01<\/strong><\/p>\n<p><strong>DonLuc1806Mk01a.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"DonLuc1806Mk01a.ino\">\r\n\/\/ ***** Don Luc *****\r\n\/\/ Software Version Information\r\n\/\/ Project #6: MicroView - EMF Meter (Single Axis) - Mk08\r\n\/\/ 6.1\r\n\/\/ DonLuc1806Mk01 6-1\r\n\/\/ MicroView\r\n\/\/ EMF Meter (Single Axis)\r\n\r\n\/\/ include the library code:\r\n#include &lt;MicroView.h&gt;\r\n#include &lt;Adafruit_NeoPixel.h&gt;\r\n\/\/ Pitches\r\n#include &quot;pitches.h&quot;\r\n#include &lt;OneWire.h&gt;\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 = A5;                            \/\/ EMF Meter\r\nint readings[ NUMREADINGS ];              \/\/ Readings from the analog input\r\nint index = 0;                            \/\/ Index of the current reading\r\nint total = 0;                            \/\/ Running total\r\nint average = 0;                          \/\/ Final average of the probe reading\r\n\/\/ NeoPixels\r\n#define PIN 3                             \/\/ On digital pin 3\r\n#define NUMPIXELS 8                       \/\/ NeoPixels NUMPIXELS = 8\r\nAdafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);\r\nint red = 0;                              \/\/ Red\r\nint green = 0;                            \/\/ Green\r\nint blue = 0;                             \/\/ Blue\r\nint iNeo = 0;                             \/\/ Neopix\r\nint iBri = 0;                             \/\/ Neopix Brightness\r\n\/\/ LED\r\nint ledR = 0;                             \/\/ LED Red\r\nint ledG = 1;                             \/\/ LED Green\r\nint ledY = 2;                             \/\/ LED Yellow\r\n\/\/ 8-ohm speaker\r\n#define tonePIN 5                         \/\/ On digital pin 5\r\n\/\/ Temperature chip i\/o\r\nint DS18S20_Pin = 6;                      \/\/ DS18S20 Signal pin on digital 6\r\nOneWire ds(DS18S20_Pin);                  \/\/ On digital pin 6\r\nfloat temperature = 0;                    \/\/ Temperature\r\n\r\nvoid loop() {\r\n  \r\n  \/\/ EMF Meter (Single Axis)\r\n  isEMF();\r\n\r\n  delay(250);\r\n  \r\n  uView.clear(PAGE);  \/\/ Erase the memory buffer, the OLED will be cleared\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\nvoid isEMF(){\r\n\r\n  \/\/ LEDs - Low\r\n  for(int z=0; z&lt;NUMPIXELS; z++){ \r\n     \/\/ Black\r\n     red = 0;                                 \/\/ Red\r\n     green = 0;                               \/\/ Green\r\n     blue = 0;                                \/\/ Blue\r\n     iNeo = z;                                \/\/ Neopix\r\n     iBri = 0;                                \/\/ Neopix Brightness        \r\n     neopix(); \r\n  }\r\n  digitalWrite(ledG, LOW);                    \/\/ Turn that LED off\r\n  digitalWrite(ledY, LOW);                    \/\/ Turn that LED off  \r\n  noTone(tonePIN);                            \/\/ noTone\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[ index ];                \/\/ Subtract the last reading\r\n    readings[ index ] = val;                   \/\/ Read from the sensor\r\n    total += readings[ index ];                \/\/ Add the reading to the total\r\n    index = ( index + 1 );                     \/\/ Advance to the next index\r\n\r\n    if ( index &gt;= NUMREADINGS ) {              \/\/ If we&#039;re at the end of the array...\r\n      index = 0;                               \/\/ ...wrap around to the beginning\r\n    }  \r\n\r\n    average = total \/ NUMREADINGS;             \/\/ Calculate the average\r\n\r\n    if (average &lt; 50) {                        \/\/ If the average is less 50 ...\r\n      digitalWrite(ledG, HIGH);                \/\/ turn that LED On  \r\n      tone(tonePIN, NOTE_C3);                  \/\/ Tone         \r\n    }\r\n    else{                                      \/\/ and if it&#039;s not ...\r\n      digitalWrite(ledG, LOW);                 \/\/ turn that LED off\r\n      noTone(tonePIN);                         \/\/ noTone\r\n    }\r\n    \r\n    if (average &gt; 50){                         \/\/ If the average is over 50 ...\r\n      \/\/ Green\r\n      red = 0;                                 \/\/ Red\r\n      green = 255;                             \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 0;                                \/\/ Neopix\r\n      iBri = 100;                              \/\/ Neopix Brightness        \r\n      neopix();      \r\n      tone(tonePIN, NOTE_C4);                  \/\/ Tone\r\n    }\r\n    else{                                      \/\/ and if it&#039;s not ...\r\n      \/\/ Black\r\n      red = 0;                                 \/\/ Red\r\n      green = 0;                               \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 0;                                \/\/ Neopix\r\n      iBri = 0;                                \/\/ Neopix Brightness        \r\n      neopix();      \r\n      noTone(tonePIN);                         \/\/ noTone\r\n    }\r\n\r\n    if (average &gt; 250){                        \/\/ and so on ...\r\n      \/\/ Green\r\n      red = 0;                                 \/\/ Red\r\n      green = 255;                             \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 1;                                \/\/ Neopix\r\n      iBri = 100;                              \/\/ Neopix Brightness        \r\n      neopix();\r\n      tone(tonePIN, NOTE_D4);                  \/\/ Tone\r\n    }\r\n    else{\r\n      \/\/ Black\r\n      red = 0;                                 \/\/ Red\r\n      green = 0;                               \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 1;                                \/\/ Neopix\r\n      iBri = 0;                                \/\/ Neopix Brightness        \r\n      neopix(); \r\n      noTone(tonePIN);                         \/\/ noTone\r\n    }\r\n\r\n    if (average &gt; 350){\r\n      \/\/ Green\r\n      red = 0;                                 \/\/ Red\r\n      green = 255;                             \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 2;                                \/\/ Neopix\r\n      iBri = 100;                              \/\/ Neopix Brightness        \r\n      neopix();\r\n      tone(tonePIN, NOTE_E4);                  \/\/ Tone\r\n    }\r\n    else{\r\n      \/\/ Black\r\n      red = 0;                                 \/\/ Red\r\n      green = 0;                               \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 1;                                \/\/ Neopix\r\n      iBri = 0;                                \/\/ Neopix Brightness        \r\n      neopix(); \r\n      noTone(tonePIN);                         \/\/ noTone\r\n    }\r\n\r\n\r\n    if (average &gt; 500){\r\n      \/\/ Yellow\r\n      red = 255;                               \/\/ Red\r\n      green = 255;                             \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 3;                                \/\/ Neopix\r\n      iBri = 100;                              \/\/ Neopix Brightness        \r\n      neopix();\r\n      tone(tonePIN, NOTE_F4);                  \/\/ Tone\r\n    }\r\n    else{\r\n      \/\/ Black\r\n      red = 0;                                 \/\/ Red\r\n      green = 0;                               \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 3;                                \/\/ Neopix\r\n      iBri = 0;                                \/\/ Neopix Brightness        \r\n      neopix(); \r\n      noTone(tonePIN);                         \/\/ noTone\r\n    }\r\n\r\n    if (average &gt; 650){\r\n      \/\/ Yellow\r\n      red = 255;                               \/\/ Red\r\n      green = 255;                             \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 4;                                \/\/ Neopix\r\n      iBri = 100;                              \/\/ Neopix Brightness        \r\n      neopix();\r\n      tone(tonePIN, NOTE_G4);                  \/\/ Tone\r\n    }\r\n    else{\r\n      \/\/ Black\r\n      red = 0;                                 \/\/ Red\r\n      green = 0;                               \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 4;                                \/\/ Neopix\r\n      iBri = 0;                                \/\/ Neopix Brightness        \r\n      neopix(); \r\n      noTone(tonePIN);                         \/\/ noTone\r\n    }\r\n\r\n    if (average &gt; 750){\r\n      \/\/ Yellow\r\n      red = 255;                               \/\/ Red\r\n      green = 255;                             \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 5;                                \/\/ Neopix\r\n      iBri = 100;                              \/\/ Neopix Brightness        \r\n      neopix();\r\n      tone(tonePIN, NOTE_A4);                  \/\/ Tone\r\n    }\r\n    else{\r\n      \/\/ Black\r\n      red = 0;                                 \/\/ Red\r\n      green = 0;                               \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 5;                                \/\/ Neopix\r\n      iBri = 0;                                \/\/ Neopix Brightness        \r\n      neopix();\r\n      noTone(tonePIN);                         \/\/ noTone \r\n    }\r\n\r\n    if (average &gt; 850){\r\n      \/\/ Red\r\n      red = 255;                               \/\/ Red\r\n      green = 0;                               \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 6;                                \/\/ Neopix\r\n      iBri = 100;                              \/\/ Neopix Brightness        \r\n      neopix();\r\n      tone(tonePIN, NOTE_B4);                  \/\/ Tone\r\n    }\r\n    else{\r\n      \/\/ Black\r\n      red = 0;                                 \/\/ Red\r\n      green = 0;                               \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 6;                                \/\/ Neopix\r\n      iBri = 0;                                \/\/ Neopix Brightness        \r\n      neopix();\r\n      noTone(tonePIN);                         \/\/ noTone \r\n    }\r\n\r\n    if (average &gt; 950){\r\n      \/\/ Red\r\n      red = 255;                               \/\/ Red\r\n      green = 0;                               \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 7;                                \/\/ Neopix\r\n      iBri = 100;                              \/\/ Neopix Brightness        \r\n      neopix();\r\n      tone(tonePIN, NOTE_C5);                  \/\/ Tone\r\n    }\r\n    else{\r\n      \/\/ Black\r\n      red = 0;                                 \/\/ Red\r\n      green = 0;                               \/\/ Green\r\n      blue = 0;                                \/\/ Blue\r\n      iNeo = 7;                                \/\/ Neopix\r\n      iBri = 0;                                \/\/ Neopix Brightness        \r\n      neopix();\r\n      noTone(tonePIN);                         \/\/ noTone \r\n    }\r\n\r\n  }\r\n  else\r\n  {\r\n\r\n    digitalWrite(ledY, HIGH);                  \/\/ turn that LED On     \r\n    noTone(tonePIN);                           \/\/ noTone\r\n    \r\n  }\r\n  \r\n  uView.setFontType(0);  \/\/ Set font type 0: Numbers and letters. 10 characters per line (6 lines)\r\n\r\n  uView.setCursor(0,10); \/\/ EMF Meter\r\n  uView.print( &quot;EMF: &quot; );\r\n  uView.print( average ); \r\n\r\n  \/\/ Temperature chip i\/o\r\n  isTe();\r\n        \r\n  uView.display();       \/\/ Display\r\n   \r\n}\r\n<\/pre>\n<p><strong>getTemperature.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"getTemperature.ino\">\r\n\/\/ Temperature chip i\/o\r\nvoid isTe() {\r\n\r\n  \/\/ Temperature chip i\/o\r\n  temperature = getTemp();\r\n  \r\n  uView.setCursor(0,30);  \r\n  uView.print(temperature);\r\n  uView.print(&quot; *C&quot;);\r\n\r\n}\r\n\r\nfloat getTemp() {\r\n  \r\n  \/\/ Returns the temperature from one DS18S20 in DEG Celsius\r\n  byte data[12];\r\n  byte addr[8];\r\n \r\n  if ( !ds.search(addr)) {\r\n      \/\/ No more sensors on chain, reset search\r\n      ds.reset_search();\r\n      return -1001;\r\n  }\r\n \r\n  if ( OneWire::crc8( addr, 7) != addr[7]) {\r\n      return -1002;\r\n  }\r\n \r\n  if ( addr[0] != 0x10 &amp;&amp; addr[0] != 0x28) {\r\n      return -1003;\r\n  }\r\n \r\n  ds.reset();\r\n  ds.select(addr);\r\n  ds.write(0x44,1);                           \/\/ Start conversion, with parasite power on at the end\r\n \r\n  byte present = ds.reset();\r\n  ds.select(addr);    \r\n  ds.write(0xBE);                             \/\/ Read Scratchpad\r\n \r\n  \r\n  for (int i = 0; i &lt; 9; i++) {               \/\/ we need 9 bytes\r\n    data[i] = ds.read();\r\n  }\r\n  \r\n  ds.reset_search();\r\n  \r\n  byte MSB = data[1];\r\n  byte LSB = data[0];\r\n \r\n  float tempRead = ((MSB &lt;&lt; 8) | LSB);        \/\/ Using two&#039;s compliment\r\n  float TemperatureSum = tempRead \/ 16;\r\n  \r\n  return TemperatureSum;\r\n \r\n}\r\n<\/pre>\n<p><strong>neopix.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"neopix.ino\">\r\nvoid neopix() { \r\n    \r\n    \/\/ Brightness\r\n    pixels.setBrightness( iBri );\r\n    \/\/ Pixels.Color takes RGB values, from 0,0,0 up to 255,255,255\r\n    pixels.setPixelColor( iNeo, pixels.Color(red,green,blue) ); \r\n    \/\/ This sends the updated pixel color to the hardware\r\n    pixels.show(); \r\n    \/\/ Delay for a period of time (in milliseconds)\r\n    delay(50);     \r\n  \r\n}\r\n<\/pre>\n<p><strong>pitches.h<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"pitches.h\">\r\n\/*************************************************\r\n * Public Constants\r\n *************************************************\/\r\n \r\n\/\/ Note\r\n#define NOTE_B0  31\r\n#define NOTE_C1  33\r\n#define NOTE_CS1 35\r\n#define NOTE_D1  37\r\n#define NOTE_DS1 39\r\n#define NOTE_E1  41\r\n#define NOTE_F1  44\r\n#define NOTE_FS1 46\r\n#define NOTE_G1  49\r\n#define NOTE_GS1 52\r\n#define NOTE_A1  55\r\n#define NOTE_AS1 58\r\n#define NOTE_B1  62\r\n#define NOTE_C2  65\r\n#define NOTE_CS2 69\r\n#define NOTE_D2  73\r\n#define NOTE_DS2 78\r\n#define NOTE_E2  82\r\n#define NOTE_F2  87\r\n#define NOTE_FS2 93\r\n#define NOTE_G2  98\r\n#define NOTE_GS2 104\r\n#define NOTE_A2  110\r\n#define NOTE_AS2 117\r\n#define NOTE_B2  123\r\n#define NOTE_C3  131\r\n#define NOTE_CS3 139\r\n#define NOTE_D3  147\r\n#define NOTE_DS3 156\r\n#define NOTE_E3  165\r\n#define NOTE_F3  175\r\n#define NOTE_FS3 185\r\n#define NOTE_G3  196\r\n#define NOTE_GS3 208\r\n#define NOTE_A3  220\r\n#define NOTE_AS3 233\r\n#define NOTE_B3  247\r\n#define NOTE_C4  262\r\n#define NOTE_CS4 277\r\n#define NOTE_D4  294\r\n#define NOTE_DS4 311\r\n#define NOTE_E4  330\r\n#define NOTE_F4  349\r\n#define NOTE_FS4 370\r\n#define NOTE_G4  392\r\n#define NOTE_GS4 415\r\n#define NOTE_A4  440\r\n#define NOTE_AS4 466\r\n#define NOTE_B4  494\r\n#define NOTE_C5  523\r\n#define NOTE_CS5 554\r\n#define NOTE_D5  587\r\n#define NOTE_DS5 622\r\n#define NOTE_E5  659\r\n#define NOTE_F5  698\r\n#define NOTE_FS5 740\r\n#define NOTE_G5  784\r\n#define NOTE_GS5 831\r\n#define NOTE_A5  880\r\n#define NOTE_AS5 932\r\n#define NOTE_B5  988\r\n#define NOTE_C6  1047\r\n#define NOTE_CS6 1109\r\n#define NOTE_D6  1175\r\n#define NOTE_DS6 1245\r\n#define NOTE_E6  1319\r\n#define NOTE_F6  1397\r\n#define NOTE_FS6 1480\r\n#define NOTE_G6  1568\r\n#define NOTE_GS6 1661\r\n#define NOTE_A6  1760\r\n#define NOTE_AS6 1865\r\n#define NOTE_B6  1976\r\n#define NOTE_C7  2093\r\n#define NOTE_CS7 2217\r\n#define NOTE_D7  2349\r\n#define NOTE_DS7 2489\r\n#define NOTE_E7  2637\r\n#define NOTE_F7  2794\r\n#define NOTE_FS7 2960\r\n#define NOTE_G7  3136\r\n#define NOTE_GS7 3322\r\n#define NOTE_A7  3520\r\n#define NOTE_AS7 3729\r\n#define NOTE_B7  3951\r\n#define NOTE_C8  4186\r\n#define NOTE_CS8 4435\r\n#define NOTE_D8  4699\r\n#define NOTE_DS8 4978\r\n<\/pre>\n<p><strong>setup.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"setup.ino\">\r\nvoid setup() {\r\n\r\n  uView.begin();           \/\/ Begin of MicroView\r\n  uView.clear(ALL);        \/\/ Erase hardware memory inside the OLED controller\r\n  uView.display();         \/\/ Display the content in the buffer memory, by default it is the MicroView logo\r\n  \r\n  delay(1000);\r\n  \r\n  uView.clear(PAGE);       \/\/ Erase the memory buffer, the OLED will be cleared.\r\n   \r\n  uView.setFontType(1);    \/\/ Set font type 1: Numbers and letters. 7 characters per line (3 lines)\r\n  uView.setCursor(0,20);\r\n  uView.print(&quot;Don Luc&quot;);  \/\/ Don Luc\r\n  uView.display();         \/\/ Display\r\n  \r\n  delay(5000);\r\n\r\n  uView.clear(PAGE);       \/\/ Erase the memory buffer, the OLED will be cleared.\r\n\r\n  uView.setFontType(1);    \/\/ Set font type 1: Numbers and letters. 7 characters per line (3 lines)\r\n  uView.setCursor(0,20);\r\n  uView.print(&quot;EMF Met&quot;);  \/\/ EMF Meter (Single Axis)\r\n  uView.display();         \/\/ Display \r\n  \r\n  delay(5000);\r\n  \r\n  uView.clear(PAGE);       \/\/ Erase the memory buffer, the OLED will be cleared\r\n\r\n  \/\/ NeoPixels\r\n  pixels.begin();          \/\/ This initializes the NeoPixel library\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  \/\/ LED\r\n  pinMode( ledR, OUTPUT ); \/\/ LED Red\r\n  pinMode( ledG, OUTPUT ); \/\/ LED Green\r\n  pinMode( ledY, OUTPUT ); \/\/ LED Yellow \r\n  \/\/ LED Red - High \r\n  digitalWrite( ledR, HIGH);\r\n       \r\n}\r\n<\/pre>\n<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-1614-5\" width=\"720\" height=\"418\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01e.mp4?_=5\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01e.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/06\/DonLuc1806Mk01e.mp4<\/a><\/video><\/div>\n<p><strong>Don Luc<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Electromagnetic Field An electromagnetic field (also EMF or EM field) is a physical field produced by electrically charged objects. It affects the behavior of charged objects in the vicinity of the field. The electromagnetic field extends indefinitely throughout space and describes the electromagnetic interaction. It is one of the four fundamental forces of nature (the &#8230; <a title=\"Project #6: MicroView &#8211; EMF Meter (Single Axis) &#8211; Mk08\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=1614\" aria-label=\"Read more about Project #6: MicroView &#8211; EMF Meter (Single Axis) &#8211; Mk08\">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":[70,50,38,59,5,58,10,43],"tags":[],"class_list":["post-1614","post","type-post","status-publish","format-standard","hentry","category-microview","category-arduino","category-digitalelectronics","category-fritzing","category-microcontrollers","category-arduino-programming","category-projects","category-sparkfun"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/1614","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=1614"}],"version-history":[{"count":8,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/1614\/revisions"}],"predecessor-version":[{"id":3996,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/1614\/revisions\/3996"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}