Want to attach interrupt, but pins already used by GSM shield!! (Arduino Uno)

Hi there

I want to change my code from counting through an integer to an interrupt. But the problem is I see my TinySine GSM shield is already using pins 2 & 3 for Rx & Tx! (The only 2 pins that are available for an interupt on the Arduino Uno)

The aim is to never miss a count even if it is sending a SMS or somethng.

Does anyone know a way around these pins?

Arduino Uno.

Use a pin change interrupt.

Or see if you can use different pins with your shield - many shields have jumpers on them to select which pins it uses, to address exactly the problem you're having.

Thanks Azzy

I see there is an option to switch from Soft Serial to HW but then it involves changing the library...

as far as I know the other pins used by the shield are D7 for ring indicator, D8 for power, D9 for reset

Do you know how I can use a pin change interrupt?

http://www.tinyosshop.com/datasheet/GSM%20Shield%20Datasheet.pdf

Do you need your arduino to be connected to your computer after uploading the code and displaying things in the serial console or entering data there? If not change the jumper and you can use directly the hardware Serial and that frees pin 2 and 3.

If not bend away from the shield those 2 pins so that they do not go plug into 2 and 3 below and put a wire to go plug them somewhere else and modify their library to not do softwareSerial on 2 and 3 but on the new pins you selected.

Thanks JML. No i dont need the serial at all.

Im having big troubles trying to edit the library. Has anyone ever sucessfully done this before?

Im having big troubles trying to edit the library.

To edit what library? Why do you need to?

What was wrong with the suggestion to use pin change interrupts for YOUR interrupt?

What, EXACTLY, is going to trigger that interrupt?

I want to change my code from counting through an integer to an interrupt.

does not make sense.

You need to post your code so people can actually evaluate what's happening.

If software serial is using pins 2 and 3, you can change them to 2 other digital I/O pins when you declare/define your software serial object. Then you have to physically modify how your shield connects to your arduino using the 2 alternate pins.

--Michael

Sorry Paul a friend of mine is doing the real technical stuff here, I'm a bit of a beginner.

I'm pretty sure the tinysine gsm shield (sim900) physically needs to be able to run 2 interrupts to be able to function.

And I think that is my problem.

If software serial is using pins 2 and 3, you can change them to 2 other digital I/O pins when you declare/define your software serial object.

Unless that is controlled by a library, which OP seems to be having trouble editing.

I'm pretty sure the tinysine gsm shield (sim900) physically needs to be able to run 2 interrupts to be able to function.

I'm pretty sure that that is not the case. The pins that the shield uses are adjacent to the hardware serial pins, so that is why they are often used.

As Dr Azzy said, there are also pin change interrupts:
http://playground.arduino.cc/Main/PinChangeInt
playground.arduino.cc/Main/PcInt
Which would let you keep software serial unchanged.
--Michael