RUFF OS the OS that allows easy IoT development

in #iot6 years ago

IoT as we know it is not really that demanding when it comes to the power of the device. We usually find that they have relatively low power consumption, small memory and in many cases a 512kb Micro-controller unit. They maybe small but their infrastructure is quite demanding. For one it requires a proper up-time. Companies usually spend a lot to set the servers for just one type of IoT product, you can imagine when you have a line of IoT products. That is why the blockchain solved a major problem for IoT.

Ruff Chain began the developments of a unified operating system in 2014 and basing it on JavaScript. The fact that it is based on Javascript has attracted many developers accumulating over 15000 developers. To help developers they have been releasing a series of videos to help guide and inform developers. The OS was officially launched in 2016. Ruff Chain is ran by Roy Li who was a technical director working for Nokia and prior to that was the masters degree supervisor at Fudan University in Shanghai which explains his deep knowledge in IoT.

Ruff OS makes it easy for developers to start developing. Usually in IoT the tendency is to use GPIO to code for IoT products which can be quite irritating and complex. Ruff solved that by enabling Javascript; so developers can develop using javascript without having to learn GPIO and the likes. let us take the an example of turning on LED through GPIO using Raspberry pi and python.

#!/usr/bin/env python  
import RPi.GPIO as GPIO  
GPIO.setmode(GPIO.BCM)  
GPIO.setwarnings(False)  
GPIO.setup(2, GPIO.OUT)#Sets the GPIO pin to be an output pin  
GPIO.output(2, GPIO.HIGH) #Turn on LED

source: https://www.raspberrypi.org/forums/viewtopic.php?t=202107

In Ruff this is a simple command of “Turn On”. The Ruff Development system contains 4 primary components, Ruff OS, Ruff SDK, Rap Registry (cloud management platform) and Ruff Development Kit (consists of Ruff Development Board and other necessary peripherals like LED and buttons); now let us see how turning on LED happens in Ruff.

To get started from scratch you can purchase a board here or if you have your own raspberry pi you can go ahead but make sure you have all dependencies required by ruff (OS and SDK or you can simply follow this tutorial here. Once you have that in place download and install Ruff SDK (here you can find the suitable sdk based on your OS); that is about it. You can move to terminal now and to view the version of the SDK installed you can just use the command rap. If you get the version number that means that the SDK is installed properly.

To start developing you need to initiate a project through the command rap init. you can create a dedicated directory and perform rap init on it. All dependencies will be download including a pre defined templates like led control; along with all the dependencies. You will also have a sample or intial index.js, test.js and app.json. Open index.js using the editor of your liking. You will see turnon() command we talked about earlier. That snippet is all you need to turn on or off the led. You can see that the turnoff() command executes upon end; which means when the app exists the led will turn off.

‘use strict’;

$.ready( function ( error ) {  
if (error) {  
console .log(error);  
return ;  
}  
  
$( ‘#led-r’ ).turnOn();  
});

$.end( function () {  
$( ‘#led-r’ ).turnOff();  
});

the next step would be to connect the device. If you are using Ruff’s kit you will see it a showing a hotspot when it launches; Once connected you can easily deploy the application to it using the command Deploy RAP -s.

Ruff chain adopts DPos as their consensus; which selects an odd number of nodes based on a given criteria and they can change on each voting cycle. DPos generally is light in the sense that it is quick and does not consume much of the network resources. Ruff Chain’s mainnet would be open in 2019.

That was a short intro on how easy it is to start with ruff. You can find more resources here:

Resources:
Website: http://ruffchain.com/
Twitter: https://twitter.com/Ruff_Chain
Facebook: https://www.facebook.com/RuffChainProject/
Telegram:https://t.me/ruffchain
Medium https://medium.com/@ruffchain
Reddit https://www.reddit.com/r/ruffchain/

Sort:  

Congratulations @ethninja! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of posts published

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

I have a raspberry pi, I might test this out.

Coin Marketplace

STEEM 0.23
TRX 0.26
JST 0.039
BTC 96463.61
ETH 3397.54
USDT 1.00
SBD 3.22