HTML problem in GAS methane and water detection

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
bigcheese1960
Posts: 8
Joined: Mon Jan 05, 2015 5:45 pm
Has thanked: 2 times
Been thanked: 1 time

HTML problem in GAS methane and water detection

Post by bigcheese1960 »

Hello everyone,

I do not know very well the C language, in fact I use FC because it is more easy to do projects.
However, I must tell you that I was able to work with Arduino + Arduino Ethernet Shield and I can see the HTML page online but with a problem.

The problem, I hope you can help me to solve it, is that the HTML page does not display the sensor values and the status of the sensors, surely is a problem of HTML codes.

I enclose the project so that you can evaluate it.

Another problem is that the browser page does not update as scheduled in the code (updated every second).

If you can open the file with FC6 you have to pay attention to the connection ports of the component webserver, which must be connected as follows:
MISO port B4
MOSI port B3
CK port B5
CS port B2
INT port B0

I would also like to add the ability to send an email in case of alarm, but I would not know how to do, can you give me some ideas?
Thank you again for your help
Ciao
Alfonso
Attachments
Gas and water detection +webserver_v6.fcfx
(20.34 KiB) Downloaded 336 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: HTML problem in GAS methane and water detection

Post by Benj »

Hello Alfonso,

Please find attached a slightly modified program where I have converted your two variables from page 1, ACQUA and GAS into strings and added them as a OutValue. I have also modified the HTML code for page 1 so that it correctly references the variables as %0 and %1.
Attachments
Gas and water detection +webserver_v6.fcfx
(21.35 KiB) Downloaded 332 times

bigcheese1960
Posts: 8
Joined: Mon Jan 05, 2015 5:45 pm
Has thanked: 2 times
Been thanked: 1 time

Re: HTML problem in GAS methane and water detection

Post by bigcheese1960 »

Hello Benj,
Great !!!! Many thanks now all works and also the refresh is very fast !!!
I had to change, as you suggested, the variables Acqua and Gas in the HTML page by entering 0% and 1%.
To finish the project I would insert the ability to send an email in case of alarm, you can help me with some examples?
Thanks again for the help.
Ciao
Alfonso
I attach the final working file, could be useful for other friends!!
Attachments
Gas and water detection +webserver mod_v6.fcfx
(20.82 KiB) Downloaded 360 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: HTML problem in GAS methane and water detection

Post by Benj »

Hello Alfonso,

Sending an email should be fairly straightforward. I generated the following pseudo code based on this page: http://playground.arduino.cc/Code/Email

The SendStrings may need to have "\r\n" added to the end to generate new line characters. Not sure if these are needed or auto added by the Arduino println function as the subject field has them added already.

TCP connect(serverIP ,25)
TCP Start
Send String("helo 1.2.3.4") - where 1.2.3.4 is your IP
Send String("MAIL From: <me@mydomain.com>")
Send String("RCPT To: <you@yourdomain.com>")
Send String("DATA")
Send String("To: You <you@yourdomain.com>"));
Send String("From: Me <me@mydomain.com>"));
Send String("Subject: Arduino email test\r\n"));
Send String("This is from my Flowcode embedded project, Go with the Flow!"));
Send String(".")
Send String("QUIT")
TCP Stop

You will likely need to use the TCPIP component to do this, not sure if the TCPIP and Webserver will play nicely together but it's worth a try.

When you want to send an email I would probably do this.

Initialise TCPIP component,
Connect and Send your Email
Initialise the webserver component again.

bigcheese1960
Posts: 8
Joined: Mon Jan 05, 2015 5:45 pm
Has thanked: 2 times
Been thanked: 1 time

Re: HTML problem in GAS methane and water detection

Post by bigcheese1960 »

Hello Benj,
thank you for your replay!
I tried to insert some code as you suggested but nothing to do, I'm not able to go on in inserting the possibility to send mail.
Can you or other friends help me using my project here uploaded and adding some flow or components in order to send mail when an alarm is detected?

Thank you again for help me!
Alfonso

ahmetnoktacom
Posts: 21
Joined: Tue Jul 28, 2015 6:42 am

Re: HTML problem in GAS methane and water detection

Post by ahmetnoktacom »

hello,

I want to learn this. what I need?
Arduino uno, ethernet shild, and what? and which ethernet shild?
I want to learn urgently, help please. what I buy and need.

ahmetnoktacom
Posts: 21
Joined: Tue Jul 28, 2015 6:42 am

Re: HTML problem in GAS methane and water detection

Post by ahmetnoktacom »

I want to see all inputs and outputs via internet in other city. and I want to set all outpust and variable.

How can I do, what I need, scada and web interface program. I dont know anything :( about web communication programs with arduino.

bigcheese1960
Posts: 8
Joined: Mon Jan 05, 2015 5:45 pm
Has thanked: 2 times
Been thanked: 1 time

Re: HTML problem in GAS methane and water detection

Post by bigcheese1960 »

Hello ahmetnoktacom,
Here the list of devices that I used.

1. DC5V Smoke Methane Propane Hydrogen Gas Sensor Detector Module for Arduino (eBay)
2. Ethernet Network Shield for Arduino UNO Mega W5100 NEW (eBay)
3, Soil Hygrometer Moisture Sensor Probe and Jumpers (eBay)
4. Arduino Uno
I will try to draw a schematic using ISIS Cad program for you but it is very easy.
As you surely read all post I have had the problem in sending mail, still not solved, but it works on Internet function.
I hope this is helpfull for you!
Ciao
Alfonso

ahmetnoktacom
Posts: 21
Joined: Tue Jul 28, 2015 6:42 am

Re: HTML problem in GAS methane and water detection

Post by ahmetnoktacom »

hello,

Thank you bigcheese1960,

Now, I need only w5100 ethernet shild, as far as I understand. I have arduino uno. but how can check all data in arduino from internet, and how can I send ?
what is your advise, which program should I use?

Post Reply