<< Click to Display Table of Contents >> Web Accessible Logging with W2D |
|
Using Waijung WebPage Designer (W2D) tool to make a web interface for displaying the SQLite Data Logging on Browser.
The demo show how you can read Date/Time/Temperature from DS3232 (aMG High Precision Real Time Clock) via I2C |
Store Date/Time/Temperature for quick w2b access |
Store Date/Time/Temperature into SQLite Database Logging |
Accessing Database Table from W2D using SQLite Statement |
Building W2D interface for Date/Time setting via browser (W2D) |
Design the web interface using many tools available on W2D |
Clip 01. Introduction, Hardware, Software and Waijung Installation
Clip 02. Building plain Webserver model and W2D Installation
Clip 03. Building model for reading Temperature and Time from I2C DS3231
Clip 04. Writing Temperature and Time into SQLite Table accessible via SQLite statement
Clip 05. Adding W2D time interface function for Setting Clock on RTC using Browser Time
Clip 06. Design Web Interface for displaying Time and Temperature into Gauges and Chart using W2D
1.Introduction (Clip01)
This demo shows how you can log temperature and time into SQLite database and allows you to access it via Internet. You can access table via SQLite statement (Manual) and a custom Web Interface (Auto) designed with web design tool coming with W2D.
The whole process doesn't require any C-Coding nor HTML+javascript Coding, but there are some SQLite Statements involved.
2.Hardware Requirement (Clip01)
-aMG Labkit F4N (https://www.aimagin.com/amg-labkit-f4n.html)
-aMG High Precision Real Time Clock (https://www.aimagin.com/amg-high-precision-real-time-clock.html)
3.Software Requirement (Clip01)
-Waijung 13.08 (Release Early August 2013) (https://www.aimagin.com/download)
-Waijung Webpage Designer (W2D) 1.9g (http://waijung.aimagin.com/index.htm?w2d_disk_image.htm)
4.Installing Waijung and W2D (Clip02)
We show the installation of Waijung onto Matlab then we build a plain Webserver model for installing W2D followed by quick tour of W2D.
In Clip03, we build model for reading Temperature and Time from I2C (DS3231 chip) into data storages (also write them in our custom format) then we check and access them with browser via varget.cgi. The RTC wasn't set to current time yet.
In Clip04, we write Temperature and Time data into SQLite database table, then check/access with SQLite statement on W2D
In Clip05, we add a subsystem for W2D time interface, which will allow W2D to read and write time into MCU using current time of the browser. The mcutime is always UTC, but W2D (by Default) will display Locale time per device/location accessing.
6.Running the Demo (Clip06)
We show SQLite Statement ability on W2D (the manual way), then we design Web Interface (the automatic way) for displaying Time and Temperature into Labels, Text outputs, Gauges and Chart using W2D. The clip concluded with a quick summary.
demo File: web_log.mdl
This model is for target STM32F4 Discovery, update model then build to program to target board. See here for Setup Blocks information.
The sub-system below show the required time variable for interfacing with W2D (both name and string format)
Drag & Drop 3 Frames, 1 Gauge, 1 Bar Gauge, 2 Display, 2 Text Input, 1 Chart into drop target.
Configure each item using the following information. Notice the order of each item id. More details here.
Date/Time and Temperature are shown using two Text Input boxes(as output). In addition, Temperature is shown in Dial Gauge and Bar Gauge. Logged data from SQLite table is plotted on a Chart (x-axis = time and y-axis = Temperature).