Hi,
I'm trying to combine an Arduino Uno, Arduino GSM Shield 2, and a Velleman PKA03 motorshield. If you call the GSM shield, a motor should start.
All this i had working fine, and for some reason it stopped working.
I removed the motor shield to test it with the GSM shield only but the NET led keeps blinking (about once a second) which should indicate that he is not connected to the network. If i call the number from the simcard: it is nog available.
I tried all kind of stuff to find the mistake but i'm running out of options. i tried:
- a lot of standard GSM shield codes to test modem, network, etc. --> Same issue no network (modem seems fine)
- I tried the SIM in a telephone and i can call out, receive call, send and receive sms etc.
- I tried a different SIM in the shield and i have the same problem --> No network
- Different power supplies
i use this code (after line 22 it's stuck):
#include "GSM.h"
#define PINNUMBER "0000"
GSM gsmAccess; // include a 'true' parameter for debug enabled
GSMVoiceCall vcs;
int pwm_a = 5;
int pwm_b = 9;
int dir_a = 4;
int dir_b = 8;
void setup() {
Serial.begin(9600);
pinMode(pwm_a, OUTPUT);
pinMode(pwm_b, OUTPUT);
pinMode(dir_a, OUTPUT);
pinMode(dir_b, OUTPUT);
digitalWrite(dir_b, HIGH);
digitalWrite(pwm_b, HIGH);
boolean notConnected = true;
Serial.println("Verbinden...");
while (notConnected) {
if (gsmAccess.begin(PINNUMBER) == GSM_READY)
notConnected = false;
else {
Serial.println("Geen netwerk");
delay(1000);
}
}
Serial.println("Verbonden met netwerk");
delay(9000);
digitalWrite(pwm_b, LOW);
};
void loop() {
if (vcs.getvoiceCallStatus() == RECEIVINGCALL) {
Serial.println("inkomende oproep");
delay(1000);
// digitalWrite(dir_b, LOW);
digitalWrite(pwm_b, HIGH);
delay(10000);
digitalWrite(pwm_b, LOW);
delay(10000);
}
if (digitalRead(12) == HIGH) {
Serial.println("Motor 1 aan");
digitalWrite(dir_a, HIGH);
digitalWrite(pwm_a, HIGH);
}
else {
digitalWrite(pwm_a, LOW);
}
} //END VOID
Any tips one what i'm doing wrong or what i can test?