Onion Omega Quick Start Guide

Onion Omega is one of the most popular SBC in the IoT community, it has 3 variants, known as Omega, Omega2 and Omega2 plus. Omega comes with 580MHz CPU, WiFI, UART,I2C,SPI and much more. This tiny computer run on linux , so it’s like working on a complete computer with full graphics.

Connecting Onion Omega with CE devices

Most of the CE devices work with onion omega. There are two ways we can interface CE devices with the onion omega.

  1. Onion Omega I2C Shield (OOI2C)
Onion Omega 2 and Onion Omega 1 I2C Shield with USB Interface

This Shield lets you plug your onion omega and comes with a USB port which can be used to power up the onion omega. This USB port is also connected to the native onion omega usb port. This onion omega shield also has extra set of pins so even after plugging your onion omega into the Onion Omega I2C shield you can still access all your Onion Omega pins. This Board also has a I2C level shifter, which will shift the I2C voltage from 3.3V to 5V. All CE I2C device follow the 5V rule, so now you are ready to use your onion omega with hundreds of the CE devices.

  1. Onion Omega I2C Adapter for PE devices(OA/OB/OC)
Onion Omega 2 and Onion Omega 1 IoT Interface Adapter

This Adapter will plug into the all CE particle electron devices and will let you plug your onion omega into it. So you can get any particle electron device and plug this adapter in it and use the board with the onion omega.  So lets say if you are looking for a 8 channel relay board which should work with your Onion omega then you can get a particle electron board and this Onion Omega I2C adapter. The only difference between OA/OB/OC adapter is shape, if you are not sure which one will fit in your board, don’t worry just order the OC adapter and we’ll make sure it fits your CE particle electron board.

Getting started with Onion Omega and CE devices

Its so easy to connect your onion omega with CE devices. For an example lets say you want to interface a color sensor with onion omega. So to that you will need a color sensor and Onion Omega I2C Shield. All CE devices comes with an I2C cable, so you can use that cable to connect onion omega adapter and the color sensor. After connecting the adapter and the sensor now you can plug your onion omega into the Onion Omega i2C shield. To power up this setup you can use the micro usb port on the Onion Omega I2C shield. Once you plug the usb cable you will see a led glowing on the onion omega and a power led on the color sensor.

On the hardware side that’s all you need to do to interface a color sensor with onion omega.

Once the onion omega is powered up, you can see it as a wireless network on your computer. Connect your computer wifi with this onion omega network. Once you are connected you can open your browser and go to this address

Once you open this address it will ask for username and password. Please enter root as username and onioneer as password. For more info on setup please visit onion.io.

Once you are logged in, you will see onion omega UI on your screen. Click on terminal.

It will open a terminal window, over here it will ask you to enter the username and password. Once you enter those you are all set to test your color sensor.

Now its time to install I2C lib on your onion omega

Enter this to install I2C lib on onion omega

opkg update
opkg install python-light pyOnionI2C

Once you have all the lib, you can run this command i2cdetect -y 0

It will come up with an i2c address, this will be the address of your color sensor. Now we have made sure  our hardware and software is all set and working now we can move on writing codes and build some amazing stuff.

You can find Onion Omega sample code for most of the CE devices over here.


Onion Omega and CE device working together


How to build a FET driver using Onion Omega

If You want to build a FET drive with your onion omega, you will need following hardware

MCP23008 4-Channel 8W Open Collector FET Driver 4-Channel GPIO with IoT Interface

Once you have these two boards , all you need to do is plug the Onion Omega adapter into the pwm board and then plug your onion omega and you will have a Onion Omega powered FET drive in seconds. In this setup you don’t to any soldering or any extra wiring. You can use it as a demo project or you can also use the same board in your final setup. CE device are made to assemble easy and last long.

How to build an Onion Omega Relay Controller

To build an onion Omega relay controller you will need following hardware.

Onion Omega I2C adapter

Onion Omega 2 and Onion Omega 1 IoT Interface Adapter

Particle Electron Relay Board


To build this relay board all you need to do is plug the onion omega I2C adapter into the relay board and plug your onion omega into the onion omega i2c adapter.

How to build a temp controlled switch using onion omega

Its really awesome to build a temperature controlled FAN or any switch. Now you can do that using these devices

Onion Omega Relay Controler

Temp sensor

MCP9803 High Accuracy Temperature Sensor ±0.5°C at +25°C I2C Mini Module

To build this all you need to do is connect the relay board with the temp sensor and you are good to go. Once you have this setup you can run the the I2Cdetect command to make sure all hardware is properly connected and responding.

Most of the CE devices work together so its so easy to build your own projects using CE devices and all devices also work in the same manner, so once you learn one device you can use most of them without too much trouble. All the devices use I2C communication so you will need to make sure you don’t have 2 devices with same address on the same buss.

If you want to use two same address devices with your one onion omega at the same time then you can use CE I2C mux. It will give you multiple I2C ports and you can use multiple same I2C address device on the same bus at same time.

TCA9546A 4-Channel I2C Bus Multiplexer