Hi
I am relatively new to Arduino and am wondering if someone can assist....
I am trying to send a temperature to a online data base.
I have managed to get this working on my Arduino Uno and an ethernet shield.
I now need to get this working via gsm.
I am using an Arduino Gboard (http://imall.iteadstudio.com/im120411004.html).
I have connected the digital output of the sensor (DS18D20) to pin A4 of the board.
I am powering the sensor with my Uno as i am not sure where to get the correct power from the Gboard from.
The Code I am using is the following;
#include <call.h>
#include <gps.h>
#include <GSM.h>
#include <HWSerial.h>
#include <inetGSM.h>
#include <LOG.h>
#include <SIM900.h>
#include <sms.h>
#include <Streaming.h>
#include <WideTextFinder.h>
#include <SoftwareSerial.h>
#include <SPI.h>
#include <OneWire.h>
#include <DallasTemperature.h>
//this is for the sensors
#define ONE_WIRE_BUS 4
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
DeviceAddress sensor1 = { 0x28, 0xBD, 0xDC, 0x98, 0x05, 0x00, 0x00, 0xE4 }; // This is Sensor 1
int looped = 1;
boolean started = false;
void setup()
{
Serial.begin( 9600 );
Serial.println("GSM Shield testing. ");
pinMode(GSM_ON, OUTPUT); // pin 6-Gboard
//pinMode(6, OUTPUT);
pinMode(GSM_RESET, OUTPUT); //pin7-Gboard
if(gsm.begin(9600))
{
Serial.println("\nstatus=READY");
started=true;
Serial.println(started);
}
else Serial.println("\nstatus=IDLE");
//starting up the sensors
sensors.begin();
sensors.setResolution(sensor1, 10);
float getTemp(DeviceAddress deviceAddress)
{
float tempC = sensors.getTempC(deviceAddress);
if (tempC == -127.00) {
Serial.print("Error getting temperature");
} else {
return tempC;
}
}
void loop()
{
delay (1000);
sensors.requestTemperatures();
float temp1 = getTemp(sensor1);
Serial.print("Temp1 C: ");
Serial.println(temp1);
}
The result I get is;
GSM Shield testing.
status=READY
1
Temp1 C: 0.00
Temp1 C: 0.00
Temp1 C: 0.00
Temp1 C: 0.00
ect...
Any help would be appreciated as finding information on this Gboard and its workings has proved to be challenging.
Thanx