Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

XInput Control of Netduino Plus Across a Network


  • Please log in to reply
3 replies to this topic

#1 donjuevo

donjuevo

    New Member

  • Members
  • Pip
  • 3 posts

Posted 10 March 2012 - 01:27 PM

Hi All. An initial warning... I'm a C# Newbie and a Netduino Newbie. I've scoured these forums and most of the internet yet my hopes are dashed at every turn. A quick overview of my evil plan... Imagine if you will, an R.O.V. at the end of a CAT5 tether 50 feet under water. On board is a Netduino Plus, a couple IP Cameras and a P.O.E. ethernet switch connecting them together. On the surface, I have the router, a Windows laptop and a Logitech F510 Rumble game controller capable of XInput. This controller has 22 distinct buttons, joystick axes, triggers etc. 22 variables I can send along to the Netduino to do something cool with. Besides propulsion, maybe an articulating arm and camera panning/tilting along with the ability to send a vibration value back to the game controller. Unfortunately, for now, this is only an evil dream. I'm stuck on the communication between laptop and Netduino. I've studied every C# socket tutorial I've been able to find and haven't found anything that works. I was leaning toward asynchronous communication so that the Netduino could tell the game controller to vibrate if necessary and pass any other useful information back (ie. battery level, depth etc.). It seems the NETMF framework doesn't speak asynchronously. Here's a simple flow chart of sorts to describe what I'd like to have happen. The laptop captures the current gamepad state, sends it to the Netduino then waits for a response. The Netduino receives the gamepad state, parses the message into variables, reacts to those variables, creates a return message, sends it back to the laptop and waits for the next gamepad state. the laptop receives the message, parses, reacts, captures a new gamepad state and sends. And now we're looping. Maybe I shouldn't be barking up the asynchronous tree. I'm just hoping for a little direction here. Maybe someone has accomplished this kind of two-way communication in another way. Maybe I'm making it more difficult than it has to be. Maybe I'm just getting in my own newbie way. Apologies for the length of this. I tried to make it entertaining. Don

#2 Bainesbunch

Bainesbunch

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts
  • LocationFrance

Posted 10 March 2012 - 05:56 PM

HI, I am not sure I understand your statement " It seems the NETMF framework doesn't speak asynchronously" I am using the Netduino with the 2 serial ports receiving data from one port and sending it to the other using 2 different baud rates on the two serial ports and data moving asynchronously on both directions. The serial ports raise interrupts when data is available on the incoming buffer and so a non-blocking read and re-write can be coded with ease. Tell us a little more about why you think it is not asynchronous and perhaps we can help. Cheers Pete.
I was going to change the world, then I discovered Netduino.
The world will have to wait.

#3 donjuevo

donjuevo

    New Member

  • Members
  • Pip
  • 3 posts

Posted 10 March 2012 - 06:17 PM

My aplogies and thanks for the rapid reply! I've been trying to get a TCP client/server thing going using sockets. When I said asynchronous, that's what I was referring to. Don

#4 donjuevo

donjuevo

    New Member

  • Members
  • Pip
  • 3 posts

Posted 10 March 2012 - 09:59 PM

I found this today... http://www.codeproje...uino-and-Kinect It's a great project and after looking through the code, I'm confident I can bend it to fit my needs. Don




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.