Webserver and HTTP to RS232

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
Mathy
Posts: 333
Joined: Mon Oct 05, 2009 2:39 pm
Has thanked: 30 times
Been thanked: 33 times
Contact:

Webserver and HTTP to RS232

Post by Mathy »

Hello,

I would like to search some help for my idea.
I woud like to embed a web site with the WIZ810 component.

The idea is to send RS232 command when I click on a button on the web site or move a trimmer.

I don't know how to send data by the web server.
The only way to program a website on the WIZ810 is with HTML language ?
Do you know how to do what I would like ?

Thank you for your time,

Mathy

Mathy
Posts: 333
Joined: Mon Oct 05, 2009 2:39 pm
Has thanked: 30 times
Been thanked: 33 times
Contact:

Re: Webserver and HTTP to RS232

Post by Mathy »

Hello,

Im sorry but I don't understang anything in programming a webserver.
I saw that the arduino shield use the same W5100 chip from wiznet but in their library, they have much more macro in the server section.

I would like to know if it's is possible to send data to my mcu when clicking on a web page button with the available flowcode macro.
I learned that we need CGI command to do this, Im trying to understand but it's is difficult when you don't know c, html or other programming language !

My other question is about memory. How can I store my webpage in a flash memory for exemple and load it ?

Some help will be usefull :)

Mathy
Posts: 333
Joined: Mon Oct 05, 2009 2:39 pm
Has thanked: 30 times
Been thanked: 33 times
Contact:

Re: Webserver and HTTP to RS232

Post by Mathy »

Nobody can help me ?

I need this information before working on a schematic ( WIZ810MJ ) or if I have to choose other hardware.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Webserver and HTTP to RS232

Post by LeighM »

This is going to be very difficult for you if “you don't know c, html or other programming language”.

It is possible to do this with the WIZ810 and Flowcode, but you would need to create a web page that can generate a request url. You would then need to parse that received request url within the Flowcode web server component. This would require customisation of the C code in the GetHTMLReq function.
(Or create a new macro based on the GetHTMLReq)

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Webserver and HTTP to RS232

Post by LeighM »

Ben has just brought to my attention that in fact our WiFi component already has the functionality you are looking for, via the Read_Swap_Variable macro.

So you would also just need to create an HTML web page that has a request url, see the attached example
Attachments
mypage.txt
(154 Bytes) Downloaded 323 times

Mathy
Posts: 333
Joined: Mon Oct 05, 2009 2:39 pm
Has thanked: 30 times
Been thanked: 33 times
Contact:

Re: Webserver and HTTP to RS232

Post by Mathy »

Thank you for your great help.

I'm very interresting in those capabilities so if I have to lean a language, why not ?!
I'm downloading exemples in javascript to help me but I have lots of work to understand all.

For exemple, I don't understand how to upload the entire website into the mcu (eg. jpeg or gif file, .js etc etc) and how to call them when I need.

?

Thank you again.

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: Webserver and HTTP to RS232

Post by Benj »

Hello,

Linking pictures into a html document is not that straightforward and we have not currently implemented a way to locally host files in Flowcode.

One easy way to allow pictures on your embedded web pages is to host the pictures online or on the network somewhere and simply reference these in the html code.
Another more painful way would be to store the images on a local SD card and use the FAT component to stream them to the client. I wouldn't really advise you go down this path unless you know a lot about how this all works and are willing to hack around at a C code level.

Mathy
Posts: 333
Joined: Mon Oct 05, 2009 2:39 pm
Has thanked: 30 times
Been thanked: 33 times
Contact:

Re: Webserver and HTTP to RS232

Post by Mathy »

Thank you for your help.
I think I will choose the easiest way to store image file :mrgreen:
This should be much faster to load !

But with other files like .cgi, .js or .css necessary to build my website, it is impossible to store them in flowcode without good understanding of C language ?

An other question is about the number of available variable between the MCU the the website. Why the 4 variables limit ?
It it possible to add more ? ( like 20 or 30 from the website to the MCU )

Sorry for all those questions but Im looking for the best way to do what I want and the Microchip TCP IP stack with xxJxx MCU seems to be very popular and we can find exemples where all is already made ( loading file into external flash memory, etc etc ).

Moreover, is there a reason for choosing WIZnet rather than microchip?

Thank you again ( and again ).

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Webserver and HTTP to RS232

Post by LeighM »

Hello,
I have done a customized Webserver for the WIZ Internet board, based on the WLAN parameter read feature, the code is posted in this topic...
http://www.matrixmultimedia.com/mmforum ... 40&t=11679

Post Reply