Hardware Reference
In-Depth Information
When you restart Arduino, the Arduino Test Suite will appear in the user-contributed libraries, as shown in
Figure 13-1 . All of the example tests are in a dedicated folder in the Tests library, and these can be loaded from the
Examples drop-down list in the Arduino IDE.
Figure 13-1. Arduino Test Suite installed in the sketch library folder
To verify that Arduino Test Suite is working, compile and upload the ATS_Constants example sketch to your
hardware, as shown in Listing 13-1. On the serial monitor, you should see each result come back as OK . This indicates a
successful test.
Listing 13-1. Arduino Test of Arduino Constants
#include <ArduinoTestSuite.h>
//************************************************************************
void setup()
{
Int startMemoryUsage;
//Start memory usage must be site prior to ATS_begin
startMemoryUsage = ATS_GetFreeMemory();
ATS_begin("Arduino", "Test of Arduino Constants");
/*
* Test Run Start
*/
//test true constant
ATS_PrintTestStatus("1. Test of true constant", true == 1);
//test false consts
ATS_PrintTestStatus( "2. Test of false constant", false == 0);
//Test of HIGH == 1
ATS_PrintTestStatus( "3. Test of HIGH == 1", HIGH == 1);
//Test of LOW == 0
ATS_PrintTestStatus( "4. Test of LOW == 0", LOW == 0);
 
Search WWH ::




Custom Search