-
Notifications
You must be signed in to change notification settings - Fork 3
DigitalRead
Asif Sardar edited this page Mar 9, 2015
·
21 revisions
Arduino Digital Read http://arduino.cc/en/Reference/DigitalRead
| Setting | Value | Value |
|---|---|---|
| Library | BuiltIn | |
| Library | DigitalRead.py | |
| Test Setup | Set Pin Mode | @{SETUP_VAR} |
| Test Teardown | NONE |
| Variable | Value | Value |
|---|---|---|
| ${PORT}= | B | |
| ${PIN}= | ${3} | |
| @{SETUP_VAR}= | ${PORT} | ${PIN} |
| Test Case | Action | Argument | Argument | Argument |
|---|---|---|---|---|
| Read high from pin | [Documentation] | Test Setup: Set the pin mode to output. | Test Case: Logs state of pin as 'HIGH'. | |
| ${high}= | Read High | ${PORT} | ${PIN} | |
| Should Be Equal | ${high} | ${true} | ||
| Read low from pin | [Documentation] | Test Setup: Set the pin mode to output. | Test Case: Logs state of pin as 'LOW'. | |
| ${low}= | Read Low | ${PORT} | ${PIN} | |
| Should Be Equal | ${low} | ${true} |
| Keyword | Action | Argument | Argument | Argument |
|---|---|---|---|---|
| Set Pin Mode | [Arguments] | @{setupVar} | ||
| ${passSetup}= | Set Up | @{setupVar}[0] | @{setupVar}[1] | |
| Should Be Equal | ${passSetup} | ${true} |