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()
{
analogReference(INTERNAL);
}
void loop()
{
reading = analogRead(tempPin);
tempC = reading / 9.31-10;
sparki.clearLCD();
sparki.print(tempC);
sparki.updateLCD();
delay(1000);
}
It’s basically a direct copy. But now I can move on and actually use this info…