question lang, is this to be deployed online or just fun project lang...
question lang, is this to be deployed online or just fun project lang...
Salamat kaayo bro.
Naa daw kuno bayad, hehehe.
Dili man ko magpa spoonfeed.
Ang ako lang bisan mangayo lang ko idea or links about this, if wa ok lang sad.
Naa nako nakit-an bro, pero TCP/IP protocol ang gamit.
So maybe ako nalang paningkamutan na katong ENC+PIC maka communicate sa server using TCP/IP protocol.
Gamiton ni sya sa project study master salbahis.
Datalogger project. Wind speed/direction, level and temperature.
Then ang mga users adto na sa website mo access if ganahan sila molantaw sa data.
Something like this, Sending temperature data from the arduino to a server .
Anyways thanks, thanks, thanks sa mga nag reply.
Bro, try daw ug node.js... Nindot siiya nga language for developing network apps... ECMAScript (JavaScript) iya gigamit, but you can write a web server (or a utility that sends UDP datagrams, in your case) in less than a dozen lines.
Naay sample code sa documentation for creating a UDP server that listens to port 41234:
Code:var dgram = require("dgram"); var server = dgram.createSocket("udp4"); server.on("message", function (msg, rinfo) { console.log("server got: " + msg + " from " + rinfo.address + ":" + rinfo.port); }); server.on("listening", function () { var address = server.address(); console.log("server listening " + address.address + ":" + address.port); }); server.bind(41234);
Last edited by simoncpu; 10-10-2012 at 07:24 PM. Reason: added sample code
kana si simon maka tabang na nimo kai mao na iyang kina-on hehehe
while browsing my old hard drive i found some interesting projects regarding socket in php.... its not for site thou it is for some else... and its evil.... hahahahahahahaha... bitaw pang white hat siya....
^ ahahahaha. Certified white hat. I salute you master.
I will soon try this bro.
Another learning na sad ni. The more the better. Thanks kaayo.
If naa ko extra time I will definitely try this.
Salamat kaayo sa inyo mga reply, tips and advices sa dri na thread mga masters.
I really appreciate it.
And sorry kaayo karun lang ko ka reply kay busy kaayo sa hardware.
By the way finally maka listen/receive na jud ko ug UDP socket sa PHP.
Here's the code:
192.168.2.3 > my ip addressCode:<?php $sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); socket_bind($sock, "192.168.2.3", "6767") or die('Could not bind to address'); while(1) { echo socket_read($sock,6767); } socket_close($sock); ?>
6767 > port to listen to
Similar Threads |
|