Hardware Reference
In-Depth Information
Arduino Test Suite Built-In Tests
The Arduino Test Suite contains several built-in tests. These are very useful, as they standardize some of the basic
tests. Running these standard tests will help you confirm that a custom Arduino-derived board has the correct pin
numbers and behaves appropriately with the digital, analog, and PWM pins as the serial values are transmitted and
received. You will need to test for memory leaks or heap fragmentation if things go wrong. The built-in tests are as
follow:
ATS_ReportMemoryUsage(int _memoryUsageAtStart)
ATS_Test_DigitalPin(uint8_t digitalPinToTest)
ATS_Test_PWM_Pin(uint8_t digitalPinToTest)
ATS_Test_AnalogInput(uint8_t analogPintoTest)
ATS_Test_EEPROM(void)
ATS_TestSerialLoopback(HardwareSerial *theSerialPort, char *serialPortName)
For the Serial port test the RX/TX pins to be wired to one another. This loops the input and output of serial
information into each other for reading, and parsing by the test suite. However, the test results are delivered over the
first serial port, and the board is programmed through it. Therefore, you can't test the port using this technique on the
Arduino Uno, the Arduino Mega has multiple serial so there is extra serial ports that can be tested so you can still get
the test results from the default serial.
Since these tests make the assumption that the board is wired for testing, you need to make sure your version of
Arduino matches the wiring in Figure 13-3 or 13-4 .
Figure 13-3. Arduino Uno configured for testing
You would use the design in Figure 13-4 to test a board similar to the Arduino Mega.
 
Search WWH ::




Custom Search