Difference between revisions of "Cutipy Test"

From wiki.emacinc.com
Jump to: navigation, search
m
 
(26 intermediate revisions by 3 users not shown)
Line 9: Line 9:
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
 
EMAC has provided a simple test script that can be run on a CutiPy to verify function.
 
EMAC has provided a simple test script that can be run on a CutiPy to verify function.
<!-- /*********************************************************************************************************/ -->
+
 
<!-- /*****************************************  General Information  *****************************************/ -->
+
== Relevant Links ==
<!-- /*********************************************************************************************************/ -->
+
[http://git.emacinc.com/micropython-public/micropython CutiPy Micropython Firmware]
{{:Templateimpl:geninfo | initials=BS | title=CutiPy Test | desc=The following page can be used to get familiarized with the CutiPy Test software | project=OE 5.0 }}
+
 
=== Tools Required ===
+
[http://git.emacinc.com/micropython-public/micropython-doc CutiPy Micropython Documentation]
 +
 
 +
[http://git.emacinc.com/micropython-public/micropython/blob/emac-release/drivers/EMAC/test.py CutiPy Test Script]
 +
 
 +
== Tools Required ==
 
* Desktop PC
 
* Desktop PC
 
* USB to mini-USB cable
 
* USB to mini-USB cable
* Serial to USB converter (for testing RS232/422/485 combo port)
+
* Micro SD Card (optional)
* DB9 Loopback (for testing DB9 serial port)
+
* Oscilloscope (for testing High Drive Outputs)
* Oscilloscope (for testing High Drive Outputs
+
 
<!-- /*********************************************************************************************************/ -->
+
== Running the Test ==
<!-- /*****************************************  Using/Working With  ******************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
 
 
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.
 
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.
  
Line 28: Line 30:
 
import test
 
import test
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
3. You should see a menu come up:
 +
<syntaxhighlight lang=python>
 +
1: Battery Voltage Test
 +
2: Battery Charger Test
 +
3: RTC Set Test
 +
4: SD Card Test
 +
5: Buttons Test
 +
6: LCD Test
 +
7: High Drive Output Test
 +
</syntaxhighlight>
 +
Select any of these tests by typing the number of the test and pressing Enter
 +
 +
== Tests ==
 +
<br>
 +
{{note | At any time during testing, CTRL-D may be used to exit a test or reboot the board}}
 +
 +
=== 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. Note that the pins toggle LOW when driven.
 +
 +
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:
 +
<syntaxhighlight lang=python>
 +
Press 'y' to continue, any other key to exit loop
 +
</syntaxhighlight>
 +
 +
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
 +
 +
== Additional Information ==
 +
[http://wiki.emacinc.com/wiki/Micropython Micropython]
 +
 +
[http://wiki.emacinc.com/wiki/Micropython_Bluemix Bluemix on Micropython]
 +
 +
[http://wiki.emacinc.com/wiki/Wifi_and_mqtt_on_the_rs9113 Wifi and MQTT on the RS9113 in Micropython]
 +
 +
[[Cutipy-MicroPython Bluetooth LE demo | Cutipy-MicroPython Bluetooth LE demo]]

Latest revision as of 10:18, 16 April 2021

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

Relevant Links

CutiPy Micropython Firmware

CutiPy Micropython Documentation

CutiPy Test Script

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
7: High Drive Output Test

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

Tests




NOTE
At any time during testing, CTRL-D may be used to exit a test or reboot the board


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. Note that the pins toggle LOW when driven.

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

Additional Information

Micropython

Bluemix on Micropython

Wifi and MQTT on the RS9113 in Micropython

Cutipy-MicroPython Bluetooth LE demo