×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    6

    Wheelchair Control via N95

    Hi guys,

    I am a researcher working on some assistive devices for severely disabled people. Currently i have an autonomous wheelchair that drives itself and avoids obstacles, the user gives indication on where he is going, through discrete joystick inputs. I am planning to use the accelerometer capabilities in the N95 to replace the joyStick and make it even easier to control the wheelchair for users with tremors or shaky hands.
    Here goes my question: I want to be able to connect to the N95 using the WLAN and transmit the accelerometer readings to a P.C that will process it and plans a path for navigation. I already found some cool libraries for reading the accelerometer but i couldn't get anything about how to connect and transmit data using Wifi. Can anyone please guide me on how to achieve this, a sample code would be of great help, i can learn very well through examples.

    Thanks in advance for anyone that can help
    =========================
    Regards,
    Tarek
    =========================

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,553

    Re: Wheelchair Control via N95

    TCP/IP sockets, or even higher-level protocols like HTTP.

    See the Chat and Webclient examples in the SDK for starters.

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    6

    Re: Wheelchair Control via N95

    here what i ended up doing:

    Server P.C:
    Code:
    import sys, socket
    host='192.168.0.100'
    port=1024
    
    # create the server socket
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.bind( (host, port) )
    s.listen(5) # start the server socket
    print "waiting of the client to connect:"
    (client, address) = s.accept()
    print "accepted connection from %s:%d" % (address[0], address[1])
    while True:
    	data = client.recv(1024)
    	if len(data) == 0:
    		print "connection with %s closed." % address[0]
    		break
    	sys.stdout.write(data)
    client.close()


    Client N95:


    Code:
    import socket
    import sys
    import e32
    
    import axyz
    
    host='192.168.0.100'
    port=1024
    
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    print "trying to connect to socket:"
    s.connect( (host, int(port) ) )
    
    #def sendData(x,y,z):
    #  print "x: %i y: %i z: %i"%(x,y,z)
    
    s.send('Test')
    axyz.connect(sendData)
    print "connected. Sending Accelerometer Data."
    
    e32.ao_sleep(30)
    
    print "closing connection with server"
    c.close()
    axyz.disconnect()
    but for some reason it doesn't seem to work, i am using an Ad-Hoc connection with my laptop which has an i.p of 192.168.0.100, is there anything i am doing wrong ?
    =========================
    Regards,
    Tarek
    =========================

Similar Threads

  1. Workaround for browser control api problems on N95 8gb and N82
    By shrosenzwe in forum Symbian Networking & Messaging (Closed)
    Replies: 6
    Last Post: 2009-05-29, 12:46
  2. Replies: 3
    Last Post: 2009-02-28, 13:57
  3. Volume control keys & APS in N95
    By gs_cmans in forum Symbian
    Replies: 2
    Last Post: 2008-12-17, 06:51
  4. Replies: 5
    Last Post: 2008-01-31, 09:58
  5. N95 Some Questions & Suggestions
    By subzero_brighton in forum General Development Questions
    Replies: 0
    Last Post: 2007-06-22, 15:37

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×