UKHAS Wiki

UK High Altitude Society

User Tools

Site Tools


code:sms_arduino

Arduino SMS Script

// Adapted from SSerial2Mobile: http://code.google.com/p/sserial2mobile/

void setup() {
	Serial.begin(4800);
	Serial.println("AT+CFUN=1"); // Turn the phone on
	delay(500);
	Serial.println("AT*SWRESET"); // Reset it
	delay(500);
}

void loop() {
	Serial.println("AT+CMGF=1"); // Set to SMS (rather than MMS etc.)
	delay(500);
	// Begin sending msg
	Serial.println("AT+CMGS=");
	Serial.print("\"");
	Serial.print(number);
	Serial.print("\"");
	Serial.println();
	delay(500);
	Serial.print(msg);
	Serial.println(26, BYTE);
	delay(500);
	// End sending msg
}
code/sms_arduino.txt · Last modified: 2009/02/24 17:29 by joshatkins

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki