I've come to a huge dilemma with my project which is causing a lot of problems.
This is purely theoretical so little code is going to be provided.
I started the project with an UNO R3 and got together a few shields.
GPS Shield from sparkfun uses pin 2 and 3 for a software serial connection
Cellular Shield from sparkfun uses pin 2 and 3 I can easily distinguish between both of them in the code do not worry
CAN Bus shield from sparkfun which eats most of the pins on the digital side of the UNO including pins 2 and 3
At this point i grabbed a go between shield to shift pins 2 and 3 ABOVE the go between to pins 4 and 5 which CAN bus does not touch. All good.
Now im running out of SRAM due to the libraries im using:
sdfatlib(The more up to date one than the one in standard distribution)
A slightly modified gps kalman filter i edited(https://github.com/rfox90/ikalman
I have proved the SRAM issue using this:
It never prints Blah5 and just hangs.
So like an idiot i went and bought a mega because it has more SRAM. The above code works there and as does the filter.Now here comes my problems:
- Software serial does not work on pins 2 and 3 or 4 and 5 (http://arduino.cc/en/Reference/SoftwareSerial)
- SPI pins have moved(Why the hell did they get moved?) I fixed this using sdfatlibs software spi but really hate doing so :'(
So now im staring at pin layouts and shields lieing on my desk wondering what exactly to do.
I haven't noticed any speed problems with software spi im only really doing .5sec line writes to one open file during the sketch though.
So mostly its the software serial issue.
For some fast reference the product pages are below:https://www.sparkfun.com/products/10039
- CAN Bushttps://www.sparkfun.com/products/10710
The only thing i can think of is designing a shield that essentially swaps around the pins a bit similar to the go between but hard traced as a go between for the mega would be huge.
Obviously the end goal with any project is to get it all down to one board so I'm not sure i want to redesign all my shields onto one board at this stage either.
What do you think ?
Also where would be the best place to suggest the addition of a cautionary note on the mega's page about the SPI relocation?