dsw7 / InoDAQV2

A multifunction I/O device built atop the ATmega328P microprocessor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

InoDAQV2

Code style: black

A multifunction I/O device built atop the ATmega328P microprocessor.

Table of Contents

Setup

Step 1 - Install arduino-cli

This project uses arduino-cli to upload Arduino source code to the target device. To install arduino-cli, follow the Quickstart section provided by the arduino-cli developers. NOTE: This project was only tested with the Arduino Uno. Other boards may or may not be compatible.

Step 2 - Install package

To install the inodaqv2 Python package, run:

make setup

The installation process will produce some build artifacts. These artifacts can be cleaned up by running:

make clean

Step 3 - Upload source

To upload the source, run:

./upload

Which will prompt:

...
1. Select serial port for upload [default = COM3]:
>

Where this port would refer to a valid serial device, such as COM3 on Windows or /dev/ttyS2 on Linux. Hit enter and continue. The install script will then prompt:

...
2. Select Fully Qualified Board Name (FQBN) [default = arduino:avr:uno]:
>

Insert a valid FQBN and hit enter.

Step 4 - Start webserver

As a final sanity check, run the webserver:

inodaq --serial-port=<serial-port>

This command will host a site locally using Flask's internal development server. Note that this webserver should not be used in a production environment. A URL will be printed to the console if a connection to the serial device is successfully established. Navigate to this URL to use the product.

Usage

Window: Digital

This window is used to toggle digital pins 2 through 13 on the device. The pins toggle to either a HIGH or LOW state. Toggling pin 13 on an Uno device should turn the onboard LED either on or off. This behaviour can be used as a sanity check.

Window: PWM

This window can be used to emit a PWM wave on any PWM compatible digital pin. The slider is used to select the duty cycle of the emitted wave. The PWM output frequency is approximately 490 Hz.

Window: AnalogRead

This window can be used to read the analog voltages on analog pins A0 through A5.

Window: DigitalRead

This window can be used to read the binary states of analog pins A0 through A5.

About

A multifunction I/O device built atop the ATmega328P microprocessor


Languages

Language:Python 68.9%Language:C++ 25.5%Language:Makefile 3.2%Language:Shell 2.4%