Skip to content

Building your own devices

Greg Bowler edited this page Jan 13, 2017 · 1 revision

Cortex-OS is a customised Linux distribution. Linux as a base operating system was chosen because of the extensible architecture and ability to run on low-power hardware. Because of this, Cortex-OS can be as lightweight or as full-featured as necessary.

To build your own device, you need to ask the following questions:

  • What inputs does the device require?
  • What outputs does the device emit?
  • What processing does the device expect?

Inputs

Most devices will have some sort of input. The simplest input is a digital switch, which can be implemented using the onboard GPIO pins. An introduction to GPIO can be seen inExample device - smart switch, although in that example the GPIO is being used as an output.

Other input devices include (but are not limited to):

  • Analogue.
  • Sound.
  • Video (camera or light sensors, etc.).
  • Internet endpoints.

Once you have defined your input, it needs to be set up in the device's setup function.

Outputs

Inputs and outputs can be seen as the same in terms of hardware limitations. Usually, anything that can be seen as an input could also be used as an output in some way. If a button is being used as an input on a GPIO pin, the button could be replaced with a light to flash when the output is triggered. If a video feed from a camera is being used as an input, a video feed on a television screen could be used as an output.

As with inputs, all outputs need to be setup in the device's setup function.

Processing

All processing is done using Neuron. Cortex-OS devices act as lightweight IoT endpoints, and are typically going to be run on low-powered devices that don't have that much internet connectivity or processing power of their own. Instead of processing on the devices themselves, inputs are transmitted to Neuron, Neuron performs processing, and then transmits the output back to the device.

Read more about Transmitting via Neuron.

Clone this wiki locally