user39935: What does this mean?? Stray\342 inprogram
// Basic sketch for EmonWRT
// Version 1.2

#define FILTERSETTLETIME 15000 // Time (ms) to allow the filters to settle before sending data

const int CT1 = 1;
const int CT2 = 1; // Set to 0 to disable CT channel 2
const int CT3 = 1; // Set to 0 to disable CT channel 3
const int VOLT = 1; // Set to 0 to disable

const int UNO = 1; // Set to 0 if your not using the UNO bootloader (i.e using Duemilanove) – All Atmega’s shipped from OpenEnergyMonitor come with Arduino Uno bootloader
#include <avr/wdt.h>
#include <JeeLib.h> // Download JeeLib: http://github.com/jcw/jeelib
ISR(WDT_vect) { Sleepy::watchdogEvent(); } // Attached JeeLib sleep function to Atmega328 watchdog -enables MCU to be put into sleep mode inbetween readings to reduce power consumption
#include <EmonLib.h>
EnergyMonitor ct1,ct2,ct3; // Create instances for each CT channel
float power1, power2, power3;
float voltage;
const int LEDpin = 9; // On-board emonTx LED

boolean settled = false;
boolean firstsensor = true; // Just to know if a , must be added in the CSV output

void setup()
{
delay(10000);

Serial.begin(9600);
Serial.println(“emonWRT CT123 and Voltage v1.2”);
pinMode(LEDpin, OUTPUT); // Setup indicator LED
digitalWrite(LEDpin, HIGH);

if (UNO) wdt_enable(WDTO_8S); // Enable anti crash (restart) watchdog if UNO bootloader is selected. Watchdog does not work with duemilanove bootloader // Restarts emonTx if sketch hangs for more than 8s
ct1.voltage(3, 225, 1); // Voltage: input pin, calibration, phase_shift

}

void loop()
{

power1 = ct1.Irms; //ct.calcIrms(number of wavelengths sample)*AC RMS voltage
power2 = ct2.Irms;
power3 = ct3.Irms;
voltage = ct1.Vrms; // AC Mains rms voltage

// because millis() returns to zero after 50 days !
if (!settled && millis() > FILTERSETTLETIME) settled = true;

if (settled) // send data only after filters have settled
{
digitalWrite(LEDpin, HIGH); delay(2); digitalWrite(LEDpin, LOW); // flash LED
**Serial.println(“EMONWRT “);**

if (CT1) {
if (!firstsensor) Serial.println(" ");
firstsensor = false;
Serial.print(power1);
}

if (CT2) {
if (!firstsensor) Serial.println(" ,");
firstsensor = false;
Serial.print(power2);
}

if (CT3) {
if (!firstsensor) Serial.println(",");
firstsensor = false;
Serial.print(power3);
}

if (VOLT) {
if (!firstsensor) Serial.println(" ");
firstsensor = false;
Serial.print(voltage);
}

firstsensor = true;

//Serial.println(” “);
Serial.println(" ");

delay(100);

Sleepy::loseSomeTime(5000); // sleep or delay in seconds – see emontx_lib
}
}


user84: Typographic quotes (“ and ”) are not part of C/C++ language for defining string literals.
For that you must use straight quotes (i.e. "). 
Hence replace:
Serial.println(“EMONWRT “);

with:
Serial.println("EMONWRT ");

Typographical quotes might get automatically created when using a word processor (e.g. MS Word) to type your source code, or when copying code from a Word document into the Arduino IDE.
The best is to keep away from word processors when typing source code.

39935: <p>What does this mean?? Stray\342 inprogram</p>

<pre><code>// Basic sketch for EmonWRT
// Version 1.2

#define FILTERSETTLETIME 15000 // Time (ms) to allow the filters to settle before sending data

const int CT1 = 1;
const int CT2 = 1; // Set to 0 to disable CT channel 2
const int CT3 = 1; // Set to 0 to disable CT channel 3
const int VOLT = 1; // Set to 0 to disable

const int UNO = 1; // Set to 0 if your not using the UNO bootloader (i.e using Duemilanove) – All Atmega’s shipped from OpenEnergyMonitor come with Arduino Uno bootloader
#include &lt;avr/wdt.h&gt;
#include &lt;JeeLib.h&gt; // Download JeeLib: http://github.com/jcw/jeelib
ISR(WDT_vect) { Sleepy::watchdogEvent(); } // Attached JeeLib sleep function to Atmega328 watchdog -enables MCU to be put into sleep mode inbetween readings to reduce power consumption
#include &lt;EmonLib.h&gt;
EnergyMonitor ct1,ct2,ct3; // Create instances for each CT channel
float power1, power2, power3;
float voltage;
const int LEDpin = 9; // On-board emonTx LED

boolean settled = false;
boolean firstsensor = true; // Just to know if a , must be added in the CSV output

void setup()
{
delay(10000);

Serial.begin(9600);
Serial.println(“emonWRT CT123 and Voltage v1.2”);
pinMode(LEDpin, OUTPUT); // Setup indicator LED
digitalWrite(LEDpin, HIGH);

if (UNO) wdt_enable(WDTO_8S); // Enable anti crash (restart) watchdog if UNO bootloader is selected. Watchdog does not work with duemilanove bootloader // Restarts emonTx if sketch hangs for more than 8s
ct1.voltage(3, 225, 1); // Voltage: input pin, calibration, phase_shift

}

void loop()
{

power1 = ct1.Irms; //ct.calcIrms(number of wavelengths sample)*AC RMS voltage
power2 = ct2.Irms;
power3 = ct3.Irms;
voltage = ct1.Vrms; // AC Mains rms voltage

// because millis() returns to zero after 50 days !
if (!settled &amp;&amp; millis() &gt; FILTERSETTLETIME) settled = true;

if (settled) // send data only after filters have settled
{
digitalWrite(LEDpin, HIGH); delay(2); digitalWrite(LEDpin, LOW); // flash LED
**Serial.println(“EMONWRT “);**

if (CT1) {
if (!firstsensor) Serial.println(" ");
firstsensor = false;
Serial.print(power1);
}

if (CT2) {
if (!firstsensor) Serial.println(" ,");
firstsensor = false;
Serial.print(power2);
}

if (CT3) {
if (!firstsensor) Serial.println(",");
firstsensor = false;
Serial.print(power3);
}

if (VOLT) {
if (!firstsensor) Serial.println(" ");
firstsensor = false;
Serial.print(voltage);
}

firstsensor = true;

//Serial.println(” “);
Serial.println(" ");

delay(100);

Sleepy::loseSomeTime(5000); // sleep or delay in seconds – see emontx_lib
}
}
</code></pre>
 84: <p>Typographic quotes (<strong>“</strong> and <strong>”</strong>) are not part of C/C++ language for defining string literals.</p>

<p>For that you must use straight quotes (i.e. <strong>"</strong>). </p>

<p>Hence replace:</p>

<pre><code>Serial.println(“EMONWRT “);
</code></pre>

<p>with:</p>

<pre><code>Serial.println("EMONWRT ");
</code></pre>

<p>Typographical quotes might get automatically created when using a word processor (e.g. MS Word) to type your source code, or when copying code from a Word document into the Arduino IDE.</p>

<p>The best is to keep away from word processors when typing source code.</p>
