Pins int1 and int2

Moderators: lily.li, violet, jessie, chao.zhang

Post Reply
bobbiy.bram
Pre-kindergarten
Pre-kindergarten
Posts: 7
Joined: Wed Dec 16, 2015 2:12 am

Pins int1 and int2

Post by bobbiy.bram » Wed Dec 16, 2015 2:15 am

Hi,
In the rephone pinout it labels the six pins on the right: gnd, int1, int2, vcc, SCL and SDA. Could int1, int2, SCL and SDA be used as GPIO?

User avatar
chao.zhang
Kindergarten
Kindergarten
Posts: 81
Joined: Thu Jan 22, 2015 9:55 am

Re: Pins int1 and int2

Post by chao.zhang » Wed Dec 16, 2015 11:56 am

bobbiy.bram wrote:Hi,
In the rephone pinout it labels the six pins on the right: gnd, int1, int2, vcc, SCL and SDA. Could int1, int2, SCL and SDA be used as GPIO?
Hi bobbiy,

yes the int1,int2 SCL and SDA can be used as GPIOs.

Please refer to the following schematic:
Image

For more info about the module schematics you can find at resources of Xadow GSM+BLE

bobbiy.bram
Pre-kindergarten
Pre-kindergarten
Posts: 7
Joined: Wed Dec 16, 2015 2:12 am

Re: Pins int1 and int2

Post by bobbiy.bram » Fri Dec 18, 2015 1:01 am

How could I use these pins in the arduino IDE? If I upload the blink sketch with pin 13 it doesn't work.

User avatar
chao.zhang
Kindergarten
Kindergarten
Posts: 81
Joined: Thu Jan 22, 2015 9:55 am

Re: Pins int1 and int2

Post by chao.zhang » Fri Dec 18, 2015 11:11 am

bobbiy.bram wrote:How could I use these pins in the arduino IDE? If I upload the blink sketch with pin 13 it doesn't work.

Hi Bobbiy,

check the topic I just posted. Access the GPIO Pins based on Different IDEs

bobbiy.bram
Pre-kindergarten
Pre-kindergarten
Posts: 7
Joined: Wed Dec 16, 2015 2:12 am

Re: Pins int1 and int2

Post by bobbiy.bram » Sat Dec 19, 2015 10:57 pm

Thanks! I've got int2, SDA and SCL working with the blink sketch. But int1 isn't working for some reason. I tried the blink sketch with the pin number 0 and E1 but they both don't work.

User avatar
chao.zhang
Kindergarten
Kindergarten
Posts: 81
Joined: Thu Jan 22, 2015 9:55 am

Re: Pins int1 and int2

Post by chao.zhang » Mon Dec 21, 2015 11:46 am

bobbiy.bram wrote:Thanks! I've got int2, SDA and SCL working with the blink sketch. But int1 isn't working for some reason. I tried the blink sketch with the pin number 0 and E1 but they both don't work.

OK, here is an example which I just tested based on Arduino IDE for RePhone Kit. Make Sure your firmware is updated to the Arduino IDE for RePhone Version

Code: Select all

#define PIN_INT1  E2    //GPIO18
#define PIN_INT2  E1    //GPIO13
#define PIN_SCL   6    //GPIO43
#define PIN_SDA   7    //GPIO44

void setup()
{
    pinMode(PIN_INT1, OUTPUT);
    pinMode(PIN_INT2, OUTPUT);
    pinMode(PIN_SCL, OUTPUT);
    pinMode(PIN_SDA, OUTPUT);
}

void loop()
{
    digitalWrite(PIN_INT1, HIGH);
    digitalWrite(PIN_INT2, LOW);
    digitalWrite(PIN_SCL, HIGH);
    digitalWrite(PIN_SDA, LOW);
    delay(1000);
    digitalWrite(PIN_INT1, LOW);
    digitalWrite(PIN_INT2, HIGH);
    digitalWrite(PIN_SCL, LOW);
    digitalWrite(PIN_SDA, HIGH);
    delay(1000);
}

Post Reply