Skip to content

Commit

Permalink
Documentation for Ring-testing (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
Krishna-13-cyber authored Feb 26, 2023
1 parent 89e2d80 commit 191882d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
Binary file added docs/examples/images/ring_testing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions docs/examples/ring-testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Ring Testing example

!!! info "Schematic"
=== "Pocket Beagle"
![](images/ring_testing.png)



## 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.

0 comments on commit 191882d

Please sign in to comment.