Hi all from a total newbie,
Here's my situation:
I've been interested in Arduino for a while now, always wanting to get started on my robot, but never quite finding the time... But now my boss has asked me to set up some project using Sparkfun ware, and I'm starting to feel the pressure...
I have to set up a temperature-reading module that will record a 2-digit positive temperature on an SD card every 30 minutes and send the data contained in the SD card in an SMS every 24h.
I don't have a choice in the gear I can use, here's what I have:
- sparkfun Redboard
- Cellular Shield MG 2639 with antenna
- MicroSD transflash breakout
- Bi-directional converter (3.3V - 5v)
- Temp sensor TMP36
Please guys, remember we all have to start someday and I really need some help on this! 
Thanks heaps in advance
Quick Edit: I'm pretty confident I can record the data on the SD card, it's the part where I have to extract the data from the SD card and send it over SMS that's bugging me...
Brisben
First, learn to use the gms shield apart. Then mixing both codes shouldnt be a problem.
Well actually, it's the mixing part that's a problem...
I figured how to record the data, and send it, but how do I take the data out of the SD card to include it in the SMS? I'd like to use some sort of buffer, to assign the data to a var and use the var to include the data in the SMS...
Any idea?
brisben0706:
Well actually, it's the mixing part that's a problem...
I figured how to record the data, and send it, but how do I take the data out of the SD card to include it in the SMS? I'd like to use some sort of buffer, to assign the data to a var and use the var to include the data in the SMS...
Any idea?
But did you manage to send sms alone? Without reading SD, just a simple "Hello world"?
If yes, then post the code, and also the code for reading from SD, and w'll try to figure it out here.
I have an application that responds to sms messages requests by sending back an sms message response.
One of the standard requests is to retrieve the content of a text file from the systems SD card and to send it back in an sms message.
This application also sends automatic status sms messages every hour - that could be changed to daily messages.
But all of my arduino devices are completely different to yours - so I don't think I can help you much.
Keep going - you will find a solution.
Cheers
Catweazle NZ
#include <GSM.h>
GSM GSMAccess;
GSM_SMS sms;
int PhoneNumber = 123456789;
String SMSText = "Hello World!"
void setup() {
GSMAccess.begin();
sms.beginSMS(PhoneNumber);
sms.print(SMSText);
sms.endSMS();
}
void loop() {
}
Mart256:
That's how I figured I'd send an SMS. Seeing that I don't have any way to test it (the gear my boss ordered isn't gonna be here for another 10 days), that's the best I can come up with right now.
As for writing on the SD card, here it is:
#include <SPI.h>
#include <SD.h>
File TempFile;
String DataString = "";
String SMSData = "";
int AnalogPin = 0;
int AnalogVal = 0;
int AnalogTemp = 0;
void setup() {
AnalogVal = analogRead (AnalogPin);
AnalogTemp = AnalogVal * 0.0333;
DataString += String(AnalogTemp);
TempFile = SD.open("templog.txt", FILE_WRITE);
TempFile.println(DataString);
TempFile.close();
}
void loop() {
}
So I guess this one needs working on, as i'm trying to add to templog.txt, not overwrite it every 30 minutes.
Cause that's gonna be another problem altogether, how to time it all?
Anyway, thanks heaps for helping!
CatweazleNZ (LMAO) :
i'd love to see your code anyway mate, can't hurt to learn new stuff!