Build your Prototype

Step 1: Select Sensors, Actuators and Insight tools

Start with basic structure of Shunya Interfaces, and keep adding the API's to this structure.

/*Include this header file into your program */
#include <shunyaInterfaces.h>
/* Main Function */
int main(void) {
/* initialize the Library*/
initLib();
return 0;
}

Choose Sensors (Gather data)

  1. Voltage
  2. Distance
  3. Light Intensity
  4. Current
  5. Liquid Flow
  6. Gas (coming soon)
  7. Pressure (coming soon)
  8. Humidity (coming soon)
  9. Motion (coming soon)
  10. Temperature (coming soon)

Choose Insight tools

  1. Send Data to Cloud (AWS)
  2. Send Data to Dashboard (coming soon)

Choose to send Alerts

  1. Send Alerts via Mail (coming soon)
  2. Send Alerts via Messages (coming soon)
  3. Send Alerts via WhatsApp messages (coming soon)

Choose Actuators (Hardware Actions)

  1. LED's
  2. Relay
  3. Pumps(coming soon)
  4. Fan(coming soon)

Step 2: Connect peripherals & Configure Shunya Interfaces

Choose a dev Board

Shunya Interfaces supports these development boards, you can choose any one of them to work with.

  1. RockPi-S-V10
  2. Raspberry Pi 4
  3. Raspberry Pi 3
  4. OrangePi 2G IOT

Connect peripherals

Connect all your hardware peripherals to the board.

To help you with the connections use the links in the excel to easily find pinouts for the development boards.

  1. Dev Board pinouts

Configure Shunya Interfaces

Tell Shunya Interfaces what peripheral you have connected and where it is connected.

Copy the template into your projects folder.

Fill the templates with the sensor IDs against the pin that you have connected the sensor. The config file follows the YAML format.

Example YAML file snippet :

pin 1: null # null for no connections on the pin
pin 2: null
pin 3: 1.1 # Sensor ID for BME280 is 1 while the pin is SDA hence the .1
pin 4: null
pin 5: 1.2 # Sensor ID for BME280 is 1 while the pin is SCL hence the .2
pin 6: null

Step 3: Install Shunya OS

What will you need.

  1. Shunya OS Supported board
  2. microSD card reader/adapter
  3. microSD card
  4. Laptop/PC

Step 3.1 : Install Etcher

For Ubuntu 16.04

  1. Run this command in the Terminal
$ sudo apt update
$ sudo apt install balena-etcher-electron

Step 3.2 : Flash Shunya OS

  1. Download Shunya OS
  2. Right click on the downloaded zip file.
  3. Click Extract here.
  4. Open Etcher.
  5. Click Select Image.
  6. You will find the Shunya OS .img file in the folder that we had extracted earlier.
  7. Select shunya-aaaa-image-xxxx.img file.
  8. Insert SD card.
  9. Click on Flash.
Oops!, No Image to display.

This will start loading the SD-card with Shunya OS.

Step 3.3 : Booting Up with Shunya OS

  1. Insert the SD card into the board.
  2. Connect Keyboard and Mouse.
  3. Connect Monitor (if available).
  4. Connect Power Supply.

The board should boot up with Shunya OS.

Login

Login with these credentials:

  • Username : shunya
  • Password : shunya

Step 4: Run your program

Compile code and Run the program.

$ gcc -o myapp program.c -lshunyaInterfaces_user -lshunyaInterfaces_core
$ sudo ./myapp