-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation for Ring-testing (#51)
- Loading branch information
1 parent
89e2d80
commit 191882d
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Ring Testing example | ||
|
||
!!! info "Schematic" | ||
=== "Pocket Beagle" | ||
 | ||
|
||
|
||
|
||
## Code | ||
|
||
```python | ||
while : true | ||
{ | ||
if: digital_read(P1_33) | ||
{ | ||
digital_write(P1_36, true); | ||
} | ||
else | ||
{ | ||
digital_write(P1_36, false); | ||
} | ||
} | ||
``` | ||
|
||
* This is the code for ring-testing with simpPRU on PocketBeagle,the pinout given works well for this testing. | ||
|
||
## Explaination | ||
The above code is in simpPRU which is equivalent to [PRU C](https://github.com/beagleboard/cloud9-examples/blob/v2020.01/PocketBeagle/pru/ring.pru0.c). | ||
|
||
This code runs a never ending loop, since it is `while : true`. | ||
Inside `while` it reads header pin P1_33, it checks if header pin P1_33 is HIGH or LOW.If header pin P1_33 is HIGH, header pin P1_36 is set to LOW, and if header pin P1_33 is LOW, header pin P1_36 is set to HIGH. |