Hi,
I am using SparkFun's cellular shield for Arduino for my project. I am using Arduino Due as well. So there are 4 hardware serial ports for this board and I'm trying to make use of the tx1 and rx1 pins on the board. The idea is to send a call to a parent once the microcontroller detects unwanted levels of carbon monoxide from a carbon monoxide sensor attached to one of the analog pins on the board.
I was referring to a few tutorials online, however most of them use boards other than DUE, thereby incorporating the SoftwareSerial library. I realize this library cannot be used as the DUE clock speed is 84MHz. I was mainly referring to the tutorial found on this website:
http://tronixstuff.com/2011/01/19/tutorial-arduino-and-gsm-cellular-part-one/
In the above mentioned link, the author creates a fake serial port "cell" of type SoftwareSerial and this plays a key role in the next lines of code. How do I accomplish this with the DUE?
The purpose of what I'm trying to achieve can be seen further down in Example 26.2, where the aforementioned "cell" calls the function println to dial a phone number and end the call. I wanted to know if the code I have written below is right and will perform the same way as the one seen in Example 26.2 of the website. In the code below, I replaced all "cell" from Example 26.2 to Serial1. Any help or guidance would be appreciated.
char incoming_char = 0;
void setup(){
Serial1.begin(9600);
Serial1.println("Starting SM5200B Communication");
}
void loop(){
Serial1.println("ATDxxxxxxxxxx");
delay(20000);
Serial1.println("ATH");
do{
delay(1);
}
while(1>0);
}