53

Eclipse Mita – A New Programming Language for the Embedded IoT

 5 years ago
source link: https://www.tuicool.com/articles/hit/MV3qyiU
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

VFBZbmQ.png!web

Eclipse Mita is a programming language that is focused on making Internet-Of-Things things easier to program, especially for developers without an embedded development background. It aims to increase programmer productivity, enables fast exploration of use-cases and tries to make you feel right at home on an embedded device.

package demo;
import platforms.xdk110;

setup smartphone : BLE {
    deviceName = "HelloWorld";
    var shockDetected = bool_characteristic(UUID=0xCAFE);
}

every accelerometer.activity {
    if(accelerometer.magnitude.read() > 5000) {
        smartphone.shockDetected.write(true);
    }
}

These ten lines above implement a Bluetooth-enabled shock detector. In Mita you don’t have to setup things on your system, everything ships with sensible defaults. You can directly react to events generated by sensors, connectivity (e.g. Bluetooth or WLAN) and time itself. Its syntax was designed to make you feel right at home.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK