Web ADC wtih W2D

<< Click to Display Table of Contents >>

Navigation:  STM32F4 Target > Demos > Waijung Demos > Network Monitoring and Control >

Web ADC wtih W2D

Previous pageReturn to chapter overviewNext page

demo File: web_adc.mdl

This model is for target STM32F4 Discovery, update model then build to program to target board. See here for Setup Blocks information.

w2d_web_adc_detail

w2d_setup_detail

Description

Using Waijung WebPage Designer (W2D) tool to make a web interface for reading ADC value into Text Output and Chart. 4 LEDs on MCU webserver will change as the ADC value changes. You also have an Override Switch to directly control the Blue LED.

Hardware Setup

w2d_hardware_adc

Web Interface Setup

Drag & Drop 2 Frames, 2 Display Labels, 1 ON-OFF Switch, 1 Text Input and 1 Chart into Drop Target.

w2d_web_adc_design

Configure each item using the following information. Notice the order of each item id. More details here.

w2d_web_adc_sqlite

What should be happening?

WebPage interface show ADC Value read from SQLite table as Text Output and Chart. Text Output refresh every 500 ms and Chart reload every 1000 ms. The ADC pin CO is connect to aMG Photocell - A Vsense reading ADC value between 0V (Bright) and 3.3V (Dark) according to the light ambient.

When ADC value read >= 1.5V Green LED is on.

When ADC value read >= 1.9V Green and Orange LEDs are on.

When ADC value read >= 1.5V Green, Orange and Red LEDs are on.

When ADC value read >= 1.5V Green, Orange, Red and Blue LEDs are on.

Once you press Blue LED Override Switch ON, the Blue LED will light up no matter what the ADC value is.

w2d_web_adc_page

The Appearance on Chome for Android

w2d_web_adc_page_mobile