Pages: [1]   Go Down
Author Topic: How do you define a "PATH" to pull in the Standard Template Library from Quincy  (Read 362 times)
0 Members and 1 Guest are viewing this topic.
Arizon, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am trying to pull in the C++ Standard Template Library (STD) from any share-ware source.  The only C++ environment I have at this time is Quincy99, but I can bring any share-ware C++ "stuff" as needed.

Please excuse my ignorance to the topic...I'll give a little background info.

I used to be a software engineer for a defense contractor designing unmanned combat vehicles, then PTSD kicked in from some war-time experiences--which made me "stupid."  My long-term memory/coding skills are still there, but PTSD kills your short term memory--which is making it hard for me to figure out how-to import C++ libraries into the Arduino IDE.  I can't find anything related to setting up "PATHS" in the Arduino site.  I'm thinking I may even have to get under the "setup()" and "loop()" functions to work with classes in more detail.  No matter what the direction, what do I need to do to pull in C++ libraries and make them work with Arduino?

Not looking for sympathy, just explaining that I can understand tech talk but I need some step-by-step instructions to help me pull in these libraries.  My long-term memory still remembers how to code, but this damn short term memory issue is making it very hard for me to search on the web and find a solution.

Can any of you guys help me out?

As payback for any and all help, I am posting a method for making the Arduino WiFi Shield work with Arduino MEGA series boards.  My little contribution to another problem that I was not able to find the solution to online.

My current project is connecting a WiFi shield onto an Arduino MEGA ADK board.  It is not a plug and play scenario.  I've got it connected and working.  I haven't found any one on the web that posted how to get it to work.  Basically bend out the WiFi Shields digital pins 11, 12, & 13 so they don't go into the MEGA board.  Put jumper wires from the MEGA to the WiFi in the following order:

MEGA Digital 50 (MISO) to WiFi Digital 11
MEGA Digital 51 (MOSI) to WiFi Digital 12
MEGA Digital 52 (SCK or Clock) to WiFi Digital 13
MEGA Digital 53 (SS) to nothing on the WiFi

Make sure to set MEGA D52 to OUTPUT (per WiFi data sheet) in the beginning of your script's setup function.  FYI this pin is not used with the WiFi shield even though it is set to output

Import (copy/paste)  the "pins_arduino.h" file from the following path into my script folder:
C:\"your main arduino folder"\hardware\arduino\variants\mega\"pins_arduino.h"

If you don't do this. SPI library will use a different "pins_arduino.h" file and you will have issues.

Make sure you also copy and paste the SPI library into your script folder because the SPI.cpp file calls the local "pins_arduino.h" file.  After you pull the SPI library into your script folder, make sure the the SPI.cpp document states:

#include "pins_arduino.h"

not #include <pins_arduino.h>

That is all you have to do to make the Arduino MEGA series work with the Arduino WiFi Shield minus using the <SPH.h> <WiFi.h> and <SD.h> libraries already included in Arduino 1.X

Double check the software details with the Arduino WiFi shield online documentation.

Can anyone help me please?





Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 207
Posts: 12921
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Does this help...
http://www.gammon.com.au/forum/?id=11119
Logged

Arizon, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks! 

I was able to pull in that library and get the example to work.

Now I know where to put the functionality I need to try and pull in <iostream> and<fstream>.

I'm okay with pulling in some larger classes since I'm using a MEGA ADK.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 614
Posts: 49365
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm okay with pulling in some larger classes since I'm using a MEGA ADK.
But, the classes need to make sense in terms of the operating system and hardware. The Arduino doesn't have an OS, and no file system. So, I can't see fstream being a useful class.

There is already a Stream class for the Arduino that you could derive from or use, if you have some streaming needs that make sense on the Arduino.
Logged

Pages: [1]   Go Up
Jump to: