Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository Cleanup #12

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
21a494e
Moved Files Into Folders
ElectronicsArchiver Mar 27, 2022
52872af
Separated Out README
ElectronicsArchiver Mar 27, 2022
e94e450
Added Link References
ElectronicsArchiver Mar 27, 2022
90d7b24
Formatted Headline
ElectronicsArchiver Mar 27, 2022
6a611eb
Replaced License Link With Linked License Badge
ElectronicsArchiver Mar 27, 2022
75f83cd
Added Link Toolbar
ElectronicsArchiver Mar 27, 2022
7d477e5
Added Linked Python Badge
ElectronicsArchiver Mar 27, 2022
b16b4c4
Updated Module Installation To Use Pip
ElectronicsArchiver Mar 27, 2022
bc52e1b
Moved ADS1015 Into Separate File
ElectronicsArchiver Mar 27, 2022
20996de
Reworded Contribute Section
ElectronicsArchiver Mar 27, 2022
e56b03b
Moved Dependencies Into Separate File
ElectronicsArchiver Mar 27, 2022
5f9737c
Reworded Motivation Section
ElectronicsArchiver Mar 27, 2022
1af2a8d
Added Edited Images
ElectronicsArchiver Mar 27, 2022
20cb665
Rewrote Description
ElectronicsArchiver Mar 27, 2022
052aae6
Added Spacing
ElectronicsArchiver Mar 27, 2022
13d0673
Formatted Dependencies
ElectronicsArchiver Mar 27, 2022
76cb10e
Added EditorConfig
ElectronicsArchiver Mar 27, 2022
138925a
Added Spacing
ElectronicsArchiver Mar 27, 2022
631f6b0
Added Link To Supported Boards
ElectronicsArchiver Mar 27, 2022
7650f5b
Formatted API
ElectronicsArchiver Mar 27, 2022
f33f34a
Added Spacing
ElectronicsArchiver Mar 27, 2022
d300446
Formatted Dry Test
ElectronicsArchiver Mar 27, 2022
b6d9b2e
Added Spacing
ElectronicsArchiver Mar 27, 2022
47a4eaf
Formatted ADS1015
ElectronicsArchiver Mar 27, 2022
3fde5a3
Merge branch 'master' of https://github.com/ElectronicsArchiver/PiScope
ElectronicsArchiver Mar 27, 2022
8baf5aa
Added Spacing
ElectronicsArchiver Mar 27, 2022
44b436c
Formatted Usage
ElectronicsArchiver Mar 27, 2022
bb37b11
Added Spacing
ElectronicsArchiver Mar 27, 2022
6a7a8b2
Adjusted Editoconfig
ElectronicsArchiver Aug 3, 2022
3d5beba
Fixed Filename
ElectronicsArchiver Aug 3, 2022
89db9bd
Formatted README
ElectronicsArchiver Aug 3, 2022
c56dd0f
Formatted Documentation
ElectronicsArchiver Aug 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

root = true

[*]
insert_final_newline = true
end_of_line = lf
charset = utf-8

[*.{md,py}]
indent_style = space
indent_size = 4
71 changes: 71 additions & 0 deletions Documentation/API.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@

# API

<br>

## Import

The module can be imported with:

```python
from PiScope import Plotter
```

<br>
<br>

## Plotter

Create a **Oscilloscope** / **XY Plotter** instance with:

```python
plotter = Plotter()
```

<br>
<br>

## Setup
***`plotter.setup(channels)`***

Setup the channels of the breakout board used for oscilloscope / XY Plotter.

<br>

### Channels

**Type :** `List / Array`

The list of channels to listen to.

<br>

##### Oscilloscope

In this configuration, `channels` is a list with `1` element <br>
representing the active channel on which to listen.

```python
plotter.setup([ <Channel> ])
```

<br>

##### XY Plotter

In this configuration, `channels` is a list with `2` elements <br>
representing the active channels on which to listen.

```python
plotter.setup([ <X-Channel> , <Y-Channel> ])
```

<br>
<br>

## Plot
***`plotter.plot()`***

Plots the analog values on the **Oscilloscope** / **XY Plotter**.

<br>
55 changes: 55 additions & 0 deletions Documentation/Boards/ADS1015.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

# ADS1015

*Interfacing the ADS1015 with Raspberry Pi*

<br>
<br>

## Instructions

1. Connect the **Adafruit ADS1015** to your **Raspberry Pi**

**I2C Address :** `0x48`

| Breakout <br> Board | Pi |
|:-------------------:|:---:|
| `GND` | `GND` |
| `5V` | `5V` |
| `SDA` | `SDA` |
| `SCL` | `SCL` |
| `ADDR` | `GND` |

<br>

2. Check the devices connected to the I2C bus

```sh
i2cdetect -y 1
```

*The ADS1015 should be listed.*

<br>
<br>

## Documentation

For more information on interfacing, <br>
check out the **Adafruit** documentation.

- [Raspberry Pi & Python]

- [Configuring I2C]

- [ADC Breakouts]


<br>


<!----------------------------------------------------------------------------->

[Raspberry Pi & Python]: https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code
[Configuring I2C]: https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c
[ADC Breakouts]: https://learn.adafruit.com/adafruit-4-channel-adc-breakouts/
57 changes: 57 additions & 0 deletions Documentation/Setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

# Setup

<br>

## Hardware

1. Raspberry Pi B / B+ / 2

2. **[A Supported Breakout Board][Boards]**

<br>
<br>

## Software

1. **[Python]**

*Version `2.7`*

<br>

2. **Python Modules**

- [`numpy`][Pip Numpy]

- [`matplotlib`][Pip Matplot]

- [`scipy`][Pip Scipy]

- [`tkinter`][Tkinter]

<br>

These modules can be installed with:

```sh
pip install \
matplotlib \
numpy \
scipy
```

<br>


<!----------------------------------------------------------------------------->

[Boards]: Boards/

[Python]: https://www.python.org/

[Pip Numpy]: https://pypi.org/project/numpy/
[Pip Matplot]: https://pypi.org/project/matplotlib/
[Pip Scipy]: https://pypi.org/project/scipy/

[Tkinter]: https://docs.python.org/3/library/tkinter.html#module-tkinter
46 changes: 46 additions & 0 deletions Documentation/Test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

# Dry Test

For testing purposes and in case you do not <br>
own a **Raspberry Pi** / **Breakout Board**, you <br>
can use the following test script.

It should work on both **Linux** and **Windows**.

<br>
<br>

## Test Script

Use [`example_drytest.py`][Test] available with the repository.

```sh
python example_drytest.py
```

<br>
<br>

## Example results

<br>

### Oscilloscope

![Result Oscilloscope]

<br>

### XY Plotter

![Result XYPlotter]

<br>


<!----------------------------------------------------------------------------->

[Result Oscilloscope]: ../Resources/Oscilloscope.png
[Result XYPlotter]: ../Resources/XYPlotter.png

[Test]: ../Source/example_drytest.py
83 changes: 83 additions & 0 deletions Documentation/Usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@

# Usage

<br>

## Oscilloscope

<br>

To turn your Raspberry Pi into an **Oscilloscope** <br>
using this library, just clone the repository and <br>
use the following code:

```python
from PiScope import Plotter

plotter = Plotter()

# Here, the channel used
# on ADS1015 is channel 0

plotter.setup([ 0 ])

plotter.plot()
```

<br>

### OR

<br>
<br>

Use [`example_oscilloscope.py`][Example Oscilloscope] with:

```sh
python example_oscilloscope.py
```

<br>
<br>

## XY Plotter

<br>

To turn your Raspberry Pi into an **XY Plotter** <br>
using this library, just clone the repository <br>
and use the following code:

```python
from PiScope import Plotter

plotter = Plotter()

# Here, the channels used on A
# DS1015 are channel 0 (X)
# and channel 1 (Y).

plotter.setup([ 0 , 1 ])

plotter.plot()
```

<br>

## OR

<br>
<br>

Use [`example_xyplotter.py`][Example XYPlotter] with:

```sh
python example_xyplotter.py
```
<br>


<!----------------------------------------------------------------------------->

[Example Oscilloscope]: ../Source/example_oscilloscope.py
[Example XYPlotter]: ../Source/example_xyplotter.py
Loading