Cutipy Test

From wiki.emacinc.com
Revision as of 15:55, 30 October 2018 by Dsojka (talk | contribs)
Jump to: navigation, search

EMAC has provided a simple test script that can be run on a CutiPy to verify function.

Tools Required

  • Desktop PC
  • USB to mini-USB cable
  • Micro SD Card (optional)
  • Oscilloscope (for testing High Drive Outputs)

Running the Test

1. To begin testing the CutiPy, simply connect it via Mini-USB to USB to your computer and open a serial port monitoring program such as Minicom on linux or PuTTY on Windows.

2. Once you're able to communicate with Micropython's REPL, start the test be entering:

import test

3. You should see a menu come up:

1: Battery Voltage Test
2: Battery Charger Test
3: RTC Set Test
4: SD Card Test
5: Buttons Test
6: LCD Test

Select any of these tests by typing the number of the test and pressing Enter

Tests

1. Battery Voltage Test

The Battery Voltage test will print out the voltage the CutiPy is reading at the battery.

2. Battery Charger Test

The Battery Charger Test will print out whether or not it detects the battery charger as being connected.

3. RTC Set Test

The RTC Set Test will set the allow you to set the time in the RTC and will then read it back.

If the time that was read back matches the time you input, the RTC is working.

4. SD Card Test

For this test, you'll need an SD card inserted into the CutiPy's SD card slot. Note that the SD card will be written to.

This test will write a file to the SD card and attempt to read it back. If it succeeds, the test will print that it passed.

5. Buttons Test

When you select this option, the buttons on the back of the board will become declared. Each button will simply print out a message when pressed.

6. LCD Test

When this test is selected, the LCD should turn on and the message "Hello World" should be displayed.

7. High Drive Outputs Test

For this test, you'll need an oscilloscope or similar device to be able to detect the pins toggling.

Once you select this test, the script will toggle the first High Drive Output pin, which is pin 34 on the HDR1 header.

From there, the script will prompt you:

Press 'y' to continue, any other key to exit loop

Each time you press 'y', the script will cycle through the the 8 high drive outputs on the HDR1 header in the following order: 34 -> 33 -> 36 -> 35 -> 38 -> 37 -> 40 -> 39 -> repeat