Mihini/EclipseCon2013 Tutorial

From Eclipsepedia

Jump to: navigation, search

Contents

Tutorial

EclipseCon 2013 Tutorial plan.

Tutorial material is hosted at https://github.com/SierraWireless/eclipsecon2013-m2m-tutorial

Goals

Show Mihini

  • show key APIs such as logging, sched, airvantage, devicetree, (sms?)...
  • show how it's easy to do I/O manipulation and wireless communication

Koneki for Mihini

  • show how Lua is easy to edit thanks to LDT tooling
  • show EE and remote development for Mihini

FUN!!!!!!

Key steps

Introduction to the greenhouse demo

Note.png
TODO
slides: Benjamin


Introduction to Mihini

Note.png
TODO
slides: Benjamin


Features

Note.png
TODO
slides ?


Overall architecture

Note.png
TODO
slides: Laurent


Introduction to Koneki tools for Mihini

Note.png
TODO
slides: Benjamin


Installation of Lua Development Tools (all-in-one bundle)

DONE.

Write and run a local LUA example

Note.png
TODO
instructions ?


Configure remote system

Note.png
TODO
instructions ?


Remote launch the previous example

Note.png
TODO
instructions ?


Local communication

Note.png
TODO
slides ?


Modbus API

Note.png
TODO
slides ?


Greenhouse tutorial

Note.png
TODO
slides ?


Read/write some values with modbus

Note.png
TODO
instructions ?


Install execution environment

Note.png
TODO
instructions ?


Create new Mihini project

Note.png
TODO
instructions ?


Introduction to push data

Note.png
TODO
slides: Benjamin


M3DA protocol

Note.png
TODO
slides : Julien


push data API

Note.png
TODO
slides: Laurent


Add server communication to the code

Note.png
TODO
instructions ?


push data

Note.png
TODO
instructions ?


m2m.eclipse.org

Note.png
TODO
instructions/slides ?


JSon API for displaying data

Note.png
TODO
instructions/slides ?


Go further

Note.png
TODO
slides ?


App con

Note.png
TODO
slides: Laurent


End user android application

Note.png
TODO
slides ?



Installation of Mihini

Participants will compile and install Mihini on the Raspberry Pi based on the instructions available here

Compile Mihini source code

  • Copy (git clone?) the sources of Mihini on the Raspberry Pi
Note.png
TODO
Provide a copy of the git repo on the USB stick???


  • Compile Mihini (and its Lua VM)
  • Brief presentation of the defaultconfig ; tweak the few settings that will simplify development

First Mihini launch

  • Start Mihini on the target
  • Open a telnet connection on port 2000 to play with the agent's shell
    • a = 1
    • print(a)
    •  :agent.config.get('shell')

Hello World REMOTE

  • Configure a new Remote System corresponding to the Raspberry Pi inside LDT
  • Launch the previously written Hello World using a remote launch conf
  • Do a remote debug

Setting up the Arduino

  • First step will be to setup the arduino with a blinking LED
Note.png
TODO
Prepare Arduino IDE archives (mac, linux, win) for the USB stick


Note.png
TODO
Fritzing schematic of the blinking LED setup?


Remote run/debug

Log hello on the module.


Wireless code

Upload first data on internet using MQTT and AirVantage

Install application

Show how to install an application using mihini (and airVantage)

Hardware

The main hardware will be a Raspberry Pi (running Mihini) connected to an Arduino ; the Arduino itself being connected to several sensors/actuators.

Bill of materials

Item Qty
Raspberry Pi 1x
Arduino Uno 1x
Grove kit or equivalent 1x
Micro USB cable 1x
4GB SD card 1x
USB 1A power supply 1x
USB A-B cable 1x
Wifi dongle (Netgear WNA1000M-100FRS)* 1x
  • this might not be the best option for the US market (sounds look it is way more expensive than in Europe?)


Ordering everything from Adafruit would be: