MiMic RemoteMCU for mbed. This program provides MCU control API over REST API. It can control MCU from Javascript,PHP or any HTTP rest client directly. And, The application has self development environment.

Dependencies:   libMiMic mbed-rtos mbed NySDFileSystem

English

This is MiMic project product.

Recently modern browser is very useful. If we write small HTML code, we can draw graphics, play music. And more, we can use a lot of libraries. For example, physics engine and WebGL and .

However, the browser is clumsy for things of outside computer. For example, it can not control switching of LED and read sensor value easily.

If you can control the device outside of the computer like writing a Web page HTML, it is very convenient.

MiMicRemoteMCU enables to control directly mbed(LPC1768/LPC4088/LPCXpresso1769) by browser application .

Feature 

This is the features of MiMicRemoteMCU to experience for the user.

MiMicRemoteMCU has builtin web content in on-chip memory and some WebAPI. Browser can access contents through internal web server. The web server can handle 4 connections in parallel. Average transport speed is 1.6Mbps.

/media/uploads/nyatla/function_block.png

Browser(User interface) centralized system

From the perspective of the web browser, MiMicRemoteMCU is a standard web server. There is a Web browser is the center of the system.

By designing the browser center system, you can easily implement cooperation with multi-media system or external Web services. And, You can take advantage of all online resources that you can access from the browser. It was difficult in the standalone microcomputer legacy applications design.

/media/uploads/nyatla/fig3.png

Getting started

See more information here(Japanese).

This is old documentation(English).

日本語

新しいAPIを搭載したmbedJSをリリースしました。mbedJSのご利用をご検討ください。

Import programmbedJS

This is a Json-RPC/2.0 server with websocket and httpd. You can control mbed(s) by Javascript, processing, Java. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088

このアプリケーションはMiMic project を使った製品です。

最近のブラウザって便利ですよね。HTMLをちょこっと書けば、絵を描いたり音楽を再生したり、OpenGLやら物理演算やらなんでも出来てしまいます。

でもコンピュータの外の事、例えばその辺にあるLEDを点滅させたいとかちょっとセンサの値を読み出したいとか。そういったものには途端に不器用になります。

Webページを書くような感覚でコンピュータの外にあるデバイスを操作できれば便利だと思いませんか?

MiMicRemoteMCUをインストールしたmbed(LPCXpresso1769)を使えば、コンピュータの外にあるデバイスを、ブラウザから直接扱うことができます。

/media/uploads/nyatla/mimicrmcu1.4.png

機能

MiMicRemoteMCUの機能を紹介します。対外的な機能はMiMicRemoteMCUのROMContentsに収録されており、内蔵Webサーバを通じてWebブラウザから提供します。このWebサーバは最大4接続までのコネクションを、平均1.6Mbpsで提供することができます。

/media/uploads/nyatla/function_block.png

MiMicのアプリケーション開発

MiMicRemoteMCUはブラウザ中心のフィジカルコンピューティングを実装することに適しています。ブラウザ中心のシステムを設計することで、従来のマイコン単体アプリケーションでは難しかった外部Webサービスやマルチメディアシステムとの連携を容易に実装できます。さらにブラウザからアクセスできる全ての場所にあるオンラインリソースを活用することが出来ます。

/media/uploads/nyatla/fig3.png

導入方法

こちらの記事をご覧ください。

Committer:
nyatla
Date:
Thu Apr 04 08:32:56 2013 +0000
Revision:
0:6f25100e125b
backup;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nyatla 0:6f25100e125b 1 #include "mimic.h"
nyatla 0:6f25100e125b 2 #include "fsdata.h"
nyatla 0:6f25100e125b 3
nyatla 0:6f25100e125b 4
nyatla 0:6f25100e125b 5 /**
nyatla 0:6f25100e125b 6 * MiMic RemoteMCU httpd.<br/>
nyatla 0:6f25100e125b 7 * <p>Service list</p>
nyatla 0:6f25100e125b 8 * <pre>
nyatla 0:6f25100e125b 9 * /rom/ - romfs
nyatla 0:6f25100e125b 10 * /setup/ - MiMic configulation REST API.
nyatla 0:6f25100e125b 11 * /local/ - mbed LocalFileSystem
nyatla 0:6f25100e125b 12 * /mvm/ - MiMicVM REST API
nyatla 0:6f25100e125b 13 * </pre>
nyatla 0:6f25100e125b 14 */
nyatla 0:6f25100e125b 15
nyatla 0:6f25100e125b 16 class MyHttpd:public MiMic::Httpd
nyatla 0:6f25100e125b 17 {
nyatla 0:6f25100e125b 18 private:
nyatla 0:6f25100e125b 19 ModRomFiles modromfs;
nyatla 0:6f25100e125b 20 ModMiMicSetting mimicsetting;
nyatla 0:6f25100e125b 21 ModRemoteMcu remotemcu;
nyatla 0:6f25100e125b 22 public:
nyatla 0:6f25100e125b 23 MyHttpd():Httpd(80)
nyatla 0:6f25100e125b 24 {
nyatla 0:6f25100e125b 25 this->modromfs.setParam("/rom/",fsdata,4);
nyatla 0:6f25100e125b 26 this->mimicsetting.setParam("/setup/");
nyatla 0:6f25100e125b 27 this->remotemcu.setParam("/mvm/");
nyatla 0:6f25100e125b 28 }
nyatla 0:6f25100e125b 29 virtual void onRequest(HttpdConnection& i_connection)
nyatla 0:6f25100e125b 30 {
nyatla 0:6f25100e125b 31 //try to ModRomFS module.
nyatla 0:6f25100e125b 32 if(this->modromfs.execute(i_connection)){
nyatla 0:6f25100e125b 33 return;
nyatla 0:6f25100e125b 34 }
nyatla 0:6f25100e125b 35 //try to ModMiMicSetting module.
nyatla 0:6f25100e125b 36 if(this->mimicsetting.execute(i_connection)){
nyatla 0:6f25100e125b 37 return;
nyatla 0:6f25100e125b 38 }
nyatla 0:6f25100e125b 39 //try to ModRemoteMcu module.
nyatla 0:6f25100e125b 40 if(this->remotemcu.execute(i_connection)){
nyatla 0:6f25100e125b 41 return;
nyatla 0:6f25100e125b 42 }
nyatla 0:6f25100e125b 43 }
nyatla 0:6f25100e125b 44 };
nyatla 0:6f25100e125b 45
nyatla 0:6f25100e125b 46