I am building a system with UNO and a GSM shield. I am trying to make a system that runs on batteries, so it must consume as less power as possible.
I would like arduino to spend most of the time sleeping, and wake up whenever any of these two events take place:
1 minute passed
a button is pressed
As far as I know, arduino can wake up from sleep by means of interruptions on pins 2 and 3, but GSM shield is using them. Can I also attach a button to those pins? Would it be possible to move the communication with GSM shield to other pins? My guess it's that GSM needs to use those pins for a certain reason which I don't know.
I'm aware that the first step to save power it's to replace the voltage regulator with a more efficient one, I will do that too
Would it be possible to move the communication with GSM shield to other pins?
Bend the pins so they don't fit in the slots. Solder wires to the pins, and to two other pins, and use the two other pins in the SoftwareSerial instance setup.
My guess it's that GSM needs to use those pins for a certain reason which I don't know.
Laziness.
None of this, though, will allow you to turn off the GSM shield. Without doing that, you won't save power.
Bend the pins so they don't fit in the slots. Solder wires to the pins, and to two other pins, and use the two other pins in the SoftwareSerial instance setup.
I will definitely do that
My guess it's that GSM needs to use those pins for a certain reason which I don't know.
Laziness.
It wasn't clear for me if the communication with GSM shield needed those two pins and in particular, because it was making use of the interruptions. After reading this Arduino Playground - HomePage it's clearer
None of this, though, will allow you to turn off the GSM shield. Without doing that, you won't save power.
It is not possible to turn off the GSM shield using the power mode related functions? I haven't studied the functions yet, but I was expecting to control the 5V pin directly with those functions.
Bend the pins so they don't fit in the slots. Solder wires to the pins, and to two other pins, and use the two other pins in the SoftwareSerial instance setup.
I am quite confused on how to change the default pins to other pins in the arduino. The GSM library is the one which creates the SoftwareSerial. Diving into the code, in file GSM3SoftSerial.h I found this:
// An adaptation of NewSoftSerial for Modem Shields
// Assumes directly that Serial is attached to Pins 2 and 3, not inverse
// We are implementing it because NewSoftSerial does not deal correctly with floods
// of data
I think changing the values to i.e. 5 and 6 would make it. This might be a stupid question: the pin numbers specified must be always the ones of the arduino and not the shield, right?
If I modify the .cpp file, the IDE will be aware and will recompile it or should I do something special?