Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //************************************************************************
- //* Arduino String Memory test
- //* Created, 3 strings, check memory status.
- //*
- //* (C) 2010 by Rick Anderson
- //* Open source as per standard Arduino code
- //*
- //************************************************************************
- //* Oct 16, 2010 <ROA> Started on String Test
- //************************************************************************
- #include "WProgram.h"
- #include "HardwareSerial.h"
- #include <ArduinoTestSuite.h>
- //************************************************************************
- void setup()
- {
- char testName[64];
- int startMemoryUsage;
- /*
- * Create variable for the tests.
- */
- String stringOne;
- //Assign stringOne to be equal to the longest string
- stringOne = "<p>Lorem ipsum dolor sit amet</p><p>Ipsem</p><p>Quod</p>";
- /*;
- * initiate the test run
- */
- startMemoryUsage = ATS_GetFreeMemory();
- ATS_begin("Arduino", "String Memory Test");
- stringOne = "<HTML><HEAD><BODY>";
- stringOne = "<UL><LI>item<LI>item<LI>item</UL>";
- stringOne = "<p>Lorem ipsum dolor sit amet</p><p>Ipsem</p><p>Quod</p>";
- ATS_ReportMemoryUsage(startMemoryUsage);
- /*
- * Test complete
- */
- ATS_end();
- }
- //************************************************************************
- void loop()
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement