Initial temp sensor test

So the latest sensor I got hold of for the arduino (compatible with Sparki) is a temperature sensor. This model is using the LM35 temperature sensor which is one of the most common temperature sensors.


So the first thing was to test the code with Sparki. To do this, I just simply tweaked the example code found at arduino playground, to suit Sparki. Here’s what I ended up with:

#include <Sparki.h> // include the sparki library
float tempC;
int reading;
int tempPin = 8;

void setup()

void loop()
reading = analogRead(tempPin);
tempC = reading / 9.31-10;

It’s basically a direct copy. But now I can move on and actually use this info…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s