Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Mihini/EclipseCon2013 Tutorial"
< Mihini
(→Modbus API) |
(→Overall architecture) |
||
Line 32: | Line 32: | ||
==== Overall architecture ==== | ==== Overall architecture ==== | ||
− | {{Note| | + | {{Note| First Version OK| slides: Laurent}} |
=== Introduction to Koneki tools for Mihini === | === Introduction to Koneki tools for Mihini === |
Revision as of 14:19, 14 March 2013
Contents
- 1 Tutorial
- 1.1 Goals
- 1.2 Key steps
- 1.2.1 Introduction to the greenhouse demo
- 1.2.2 Introduction to Mihini
- 1.2.3 Introduction to Koneki tools for Mihini
- 1.2.4 Installation of Lua Development Tools (all-in-one bundle)
- 1.2.5 Local communication
- 1.2.6 Greenhouse tutorial
- 1.2.7 Introduction to push data
- 1.2.8 Add server communication to the code
- 1.2.9 Go further
- 1.2.10 Installation of Mihini
- 1.2.11 Setting up the Arduino
- 1.2.12 Remote run/debug
- 1.2.13 Wireless code
- 1.2.14 Install application
- 1.3 Hardware
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
Introduction to Mihini
DONE.
Features
Overall architecture
Introduction to Koneki tools for Mihini
Installation of Lua Development Tools (all-in-one bundle)
DONE.
Write and run a local LUA example
Configure remote system
Remote launch the previous example
Local communication
Modbus API
Greenhouse tutorial
Read/write some values with modbus
Install execution environment
Create new Mihini project
Introduction to push data
M3DA protocol
push data API
Add server communication to the code
push data
m2m.eclipse.org
JSon API for displaying data
Go further
App con
End user android application
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
- 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
- Next is the instalation of the Modbus stack --> https://github.com/kartben/mihini-greenhouse-demo/tree/master/SimpleModbusSlaveExample
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:
- Raspberry Pi: https://www.adafruit.com/products/998 - 39.95USD
- Starter pack for Arduino: https://www.adafruit.com/products/68 - 65.00USD
- Sensors (the ones provided in the budget pack)
- SD card: https://www.adafruit.com/products/102 - 7.95USD
- Power supply: https://www.adafruit.com/products/501 - 5.95USD
- USB A-Micro: https://www.adafruit.com/products/592 - 3.95USD
- USB A-B (the one provided in the budget pack)
- WiFi dongle: https://www.adafruit.com/products/814 - 11.95USD
- TOTAL: 135USD