Hello,
I'm pretty new to NetBurner and networking. I have a couple of questions regarding the GPIO pins and the FUNCTIONCALL tag in the HTML page.
1) If I wanted to get the state of say Pin 44 that I'm using as GPIO. (i.e. using the PIN 44 as an output, I want to know if it's on or off). How do I do that?
2) If I want to make a function call in the HTML page only when an image is clicked...and not have it run every time the webpage loads...is there a way to do that?
Your response is highly appreciated.
Thanks.
MOD5270 Get Pin State on or off
Re: MOD5270 Get Pin State on or off
jamenik wrote:Hello,
I'm pretty new to NetBurner and networking. I have a couple of questions regarding the GPIO pins and the FUNCTIONCALL tag in the HTML page.
1) If I wanted to get the state of say Pin 44 that I'm using as GPIO. (i.e. using the PIN 44 as an output, I want to know if it's on or off). How do I do that?
One way is pins class:
BOOL b = J2[44].
Read app notes for Mod5270 at: http://www.netburner.com/support/techni ... ments.html
2) If I want to make a function call in the HTML page only when an image is clicked...and not have it run every time the webpage loads...is there a way to do that?
FUNCTIONCALL simply tells the netburner web server to call your C function when the web page is being streamed to the client. If you want more interactive web pages such as clicking on a image to do something, the image must contain a link to somewhere else (a new page that generates a new request using HTTP), or you can use Java or Flash. These are more web programming issues than netburner issues. Just as you would with any computer system, create a tcp server task that listens for an incoming connection from your java/flash app on the host web client, then you have a 2 way data channel for whatever you want.
Your response is highly appreciated.
Thanks.