View previous topic :: View next topic |
Author |
Message |
LITTLE JON
Joined: 20 Oct 2006 Posts: 5
|
Once again 18F6720 and the Embedded Internet |
Posted: Thu Oct 26, 2006 4:09 am |
|
|
The whole kit includes two example programs, and one of these is a small WebServer which displays the current A/D readings, using a C function for "writing" on the Web page.
Is there any function to "read" from the Web page(eg: If I press a toggle button in the Web page the PIC will iluminate a LED)
Sorry if my English is not so good.
THANX |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Oct 26, 2006 1:56 pm |
|
|
CCS may have additional example files (perhaps in pre-release stage)
that they don't put on the CD-ROM that comes with the kit.
You should email CCS tech support and ask them about this. |
|
|
Ttelmah Guest
|
|
Posted: Thu Oct 26, 2006 2:38 pm |
|
|
It would though be very difficult to do 'as described'. Much easier, if this is a server, feeding data 'to' you, to not have a web page as such, but a simple text file in comma deliminated form, that can just be fetched, and parsed. If it also has to be available for human viewing, then have a web page, that displays the contents of this file, at a different address.
Best Wishes |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Oct 26, 2006 5:21 pm |
|
|
It sounds like you are describing what the CGI scripts are doing. |
|
|
Ttelmah Guest
|
|
Posted: Fri Oct 27, 2006 2:41 am |
|
|
Far easier to have a dedicated script returning a value, than to try to 'read' the value out of a human readable page (which seems to be what was being asked for). The former would be very 'specific', and I doubt if anybody would have written code to do this.
However some sites are configured so that while you can generate a 'page', you cannot generate your own scripts. On these, the easiest way would be to not have a 'page' as such, but a ftp entry containing the required data in text form, It was this that I was suggesting.
Best Wishes |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Oct 27, 2006 6:39 am |
|
|
Ttelmah wrote: | Far easier to have a dedicated script returning a value, than to try to 'read' the value out of a human readable page (which seems to be what was being asked for). The former would be very 'specific', and I doubt if anybody would have written code to do this.
However some sites are configured so that while you can generate a 'page', you cannot generate your own scripts. On these, the easiest way would be to not have a 'page' as such, but a ftp entry containing the required data in text form, It was this that I was suggesting.
Best Wishes |
I took it that the poster wants to respond to human interaction from his own page running in the PIC. Sounds like you are referring to another web page running on another server and the PIC being able to respond to it. Is this correct? |
|
|
Ttelmah Guest
|
|
Posted: Fri Oct 27, 2006 9:54 am |
|
|
It seem to me that this is what he is asking for. In other words the ability to respond to a 'remote' event on another page. If he only wants to update the local page, then obviously this is easy.
Best Wishes |
|
|
LITTLE JON
Joined: 20 Oct 2006 Posts: 5
|
|
Posted: Mon Oct 30, 2006 3:45 am |
|
|
What we are trying to do is what Ttelmah describes:to have the ability to respond to a remote event, but not on another page, but on the PIC's supported page.
Unfortunately, we are just students of electronic engineering, and many of your responses are difficult for us to understand.
We will maybe try doing something easier: using PHP we will try to send an empty text file with a name that can be recognised by the PIC(eg:"turn_the_light_on.txt")the PIC is allways looking for this file, and when it finds it, the light will be turned on.
The question now is this: Is this PIC able to support PHP?
I think this is an acceptable solution, but is there any solution more simple?
THANX TO EVERYONE FOR YOUR REPLYS |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
|
Posted: Mon Oct 30, 2006 7:28 am |
|
|
Take a step back and reexamine the overall problem.
Do HAVE to use a web interface?
Can you just send a UPD packet to the PIC?
It is much easier for a PIC to service UDP requests as they require very little CPU resources compared to having to run a HTTP session on top of TCP. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Mon Oct 30, 2006 11:46 am |
|
|
Quote: | What we are trying to do is what Ttelmah describes:to have the ability to respond to a remote event, but not on another page, but on the PIC's supported page |
If it is on the PIC's page that it is serving, then it is not as Ttelmah describes. Why don't you actually tell us what EXACTLY you are trying to do so that we can better help you. |
|
|
|