analogRead(A0); // Auslesen des Analogpins A0
int val; //Create an integer variable
double temp; //Variable to hold a temperature value
val=analogRead(0); //Read the analog port 0 and store the value in val
temp=Thermister(val); //Runs the fancy math on the raw analog value
Serial.println(temp); //Print the value to the serial port
Serial.println(val);
delay(1000); //Wait one second before we do it again

The GroveStreams client sketch is designed for the Arduino and Ethernet.
A full "how to" guide for this sketh can be found at https://www.grovestreams.com/developers/getting_started_arduino_temp.html
This sketch updates several stream feeds with an analog input reading,
from a temperature probe, via the GroveStreams API: https://www.grovestreams.com/developers/api.html
The Arduino uses DHCP and DNS for a simpler network setup.
The sketch also includes Internet Connection Reset logic to ensure the
Arduino stays connected and can regain connectivity after a network outage.
Use the Serial Monitor on the Arduino IDE to see verbose network feedback
and the GroveStreams connectivity status.

License:
Copyright 2014 GroveStreams LLC.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

GroveStreams Setup:

* Sign Up for Free User Account - https://www.grovestreams.com
* Create a GroveStreams organization while selecting the Arduino blueprint
* Enter a unique MAC Address for this network in this sketch under "Local Network Settings"
* (Newer shields have the mac address on a sticker on the shield. Use that.)
* (A MAC address can also be generated within a GroveStreams organization: Tools toolbar button - Generate MAC Address)
* (The MAC address is used to identify this device within GroveStreams. It must be unique within your GS organization)
* Enter your GroveStreams secret api key under "GroveStreams Settings" in this sketch
* (The api key can be retrieved from within a GroveStreams organization: click the Api Keys toolbar button,
* select your Api Key, and click View Secret Key. Paste the Secret Key below)

char gsDomain[] = "grovestreams.com"; //Don't change. The GroveStreams domain.
char gsComponentTemplateId[] = "temp"; //Don't change. Tells GS what template to use when the feed initially arrives and a new component needs to be created.
// The blueprint is expecting "temp".

const int temperaturePin = 0; // You might need to change depending on the Pin you are using. The Temperature pin number.
char samples[35]; // Change this buffer size only if you increase or decrease the size of samples being uploaded.

char myIPAddress[20]; //Don't Change. Set below from DHCP. Needed by GroveStreams to verify that a device is not uploading more than once every 10s.
char myMac[20]; //Don't Change. Set below from the above mac variable. The readable Mac is used by GS to determine which component the
// feeds are uploading into. It must match an existing GroveStreams component's ID

client.println(urlBuf); //Send the url with temp readings in one println(..) to decrease the chance of dropped packets
client.print(F("Host: "));
client.println();
client.println(F("Connection: close"));
client.print(F("X-Forwarded-For: ")); //Include this line and the next line if you have more than one device uploading behind
client.println(myIPAddress); // your outward facing router (avoids the GS 10 second upload rule)
client.println(F("Content-Type: application/json"));

//Set the mac and ip variables so that they can be used during sensor uploads later
Serial.print(F(" MAC: "));
Serial.println(getMacReadable());
Serial.print(F(" IP address: "));
Serial.println(getIpReadable(Ethernet.localIP()));
Serial.println();
}

analogRead(A0); // Auslesen des Analogpins A0
int val; //Create an integer variable
double temp; //Variable to hold a temperature value
val=analogRead(0); //Read the analog port 0 and store the value in val
temp=Thermister(val); //Runs the fancy math on the raw analog value
Serial.println(temp); //Print the value to the serial port
Serial.println(val);
delay(1000); //Wait one second before we do it again

analogRead(A0); // Auslesen des Analogpins A0
int val; //Create an integer variable
double temp; //Variable to hold a temperature value
val=analogRead(0); //Read the analog port 0 and store the value in val
temp=Thermister(val); //Runs the fancy math on the raw analog value
Serial.println(temp); //Print the value to the serial port
Serial.println(val);
delay(1000); //Wait one second before we do it again