OctaveOrp

Collection of information and code related to Octave ORP

View the Project on GitHub johnofleek/OctaveOrp

./docs/README.md

Arduino to mangOH yellow demo

Hardware

Parts required

  1. mangOH yellow with Octave WP7702 minimum FW 2.1.4
  2. IoT Expansion board
  3. BOB-12009 level shifter
  4. Arduino mega2560

Datasheets and schematics are available here

Connections are documented below - note that the mangOH is low voltage (LV) and the Arduino is high voltage (HV)

Diagram

Pictures of the completed system

Photo

Detail Photo

Arduino Software

The purpose of this project is to enable external microcontroller devices to exchange data with Octave using the Octave Resource Protocol via hardware UARTs.

The sketch octaveAdcDemoSketch.ino is a simple demo where the Arduino uploads raw ADC data to Octave and the Arduino receives a number as a string from Octave.

The main loop is implemented as a basic state machine. It has the following steps.

  1. Send a command to Octave to register an Octave input - if this is successful the state changes to 1.
  2. Send a command to Octave to register an Octave output - if this is successful the state changes to 2.
  3. Send a command to Octave to register an Octave output call back - if this is successful the state changes to 3.
  4. Periodically send the Arduino ADC data to Octave via the Octave input

The application has a two callback handlers

  1. Request response callback handler - this is called when Octave responses to request commands
  2. Notification callback handler - this is called when Octave sends data to the application. The payload is in ORP format - the application callback handler contains an example payload decode.

The example does not contain any error handling or robust handling of problems. For example if the mangOH is reset the Arduino application will not be able to successfully send data to Octave because the Octave IO would need to be re-registered.