DIY Wireless Network

Discussion in 'Web Design & Programming' started by thomas234, Jan 8, 2009.

  1. thomas234

    thomas234 Big Geek

    Likes Received:
    0
    Trophy Points:
    16
    Well this afternoon I was bored, and thought I'd try to create my own "wireless network" using C#. And it worked!

    Basically, on one PC you select some data to transfer. It then converts it to binary, and has a grid of squares. The grid flashes black or white, for 1's or 0's. On the receiving PC, a webcam is connected, which is streaming the image into another program. The other program knows where to look on the incoming image (has to be defined before the data transfer), and converts the black and white squares back into binary, then into bytes, and recreates the file!

    The grid consists of 320 squares, which each update twice a second (2Hz). I found this to be the best combination of reliablilty and speed. This means the transfer speed = 640 bits per second = 80 bytes per second.

    So, to send an average 5mb MP3 file it would take...

    5 * 1024 * 1024 * 8 = 41943040 bits.

    41943040 / 640 = 65536 seconds

    65536 / 60 = 1092.37 minutes

    1092.37 / 60 = 18.20 hours

    So, 5mb would be a speedy 3/4 of a day. Nice :D

    A video of my network working can be seen here. In the example I used the same PC to send and receive, but I have tried it on my laptop to transfer to PC, and it works just as well.

    YouTube - DIY Wireless network from everyday objects
     
  2. Sniper

    Sniper Administrator Staff Member

    Likes Received:
    59
    Trophy Points:
    63
    very cool dude!!
     
  3. RHochstenbach

    RHochstenbach Administrator

    Likes Received:
    26
    Trophy Points:
    48
    Looks nice :)

    However, you made a small error:
    Code:
    5 * 1024 * 1024 * 8 = 41943040 bits.
    
    41943040 / [b]80[/b] = 65536 seconds
    
    The speed was 80 bytes a second (640 bits). But you're dividing an amount in bits by an amount in bytes. So in fact you need this:
    Code:
    41943040 / [b]640[/b] =  65536
    The result (65536) is correct, but you wrote 80 instead of 640 (could be a typo).

    But this idea is really cool. If you use a camera with a high framerate and the ability to clearly 'see' smaller squares, you might be able to send more bits a second :)

    [ot]an idea: you could also try to transmit data through an audio cable (use audio impulses) :D[/ot]
     
  4. thomas234

    thomas234 Big Geek

    Likes Received:
    0
    Trophy Points:
    16
    Thanks for pointing out the mistake! I get bits and bytes muddled easily for some reason!

    And I'll add it to my list of current projects:

    1) Control the mouse using a torch shone at a wall through the video camera
    2) Convert a live stream of video into ASCII in real time
    3) Send data via audio impulses.

    Thanks!
     

Share This Page