Uso not send commands to device

New member? Introduce yourself here!

Uso not send commands to device

Postby AlexNester » Mon 21. Jul 2014, 21:54

If Im send datapacket with axis information, Output Protocol Parser: S~a01~, where ~a01~(3 data), my controller (arduino DUE) not recive data ~a01~,
But
if send S2 (controller recive data - 2) :?:

I think some idea about free version X-sim? but not sue

What version work correct?
need check program for arduino DUE

thanks
Attachments
User avatar
AlexNester
 
Posts: 9
Images: 0
Joined: Tue 24. Sep 2013, 17:49
Location: Ukraine
Has thanked: 0 time
Been thanked: 0 time

Re: Uso not send commands to device

Postby sirnoname » Mon 21. Jul 2014, 23:41

There is no limitation. You can be sure X-Sim is sending after you press start.
Remember the arduinos are not good in higher baudrates and that you did program the receive speed correctly ;)
You can enter non common baudrates like 100000 in the baud boxes to fit the crystal speed.
By the way, your bushound do show all correctly. Is the programming port the data port?
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Re: Uso not send commands to device

Postby AlexNester » Tue 22. Jul 2014, 19:49

baudrates, Im try on 9600 - the same
Use programming port (atmega16u2), its usb but system find this port like com6, native port - USB device

confuses me, that protocol parser S2 work, and S~a01~ axis information arduino not find

list of program

Code: Select all
int led = 13;   // select the pin for the LED
int val;     // variable to store the data from the serial port
int q;
char bufferArray[20];


void setup() {
  pinMode(led,OUTPUT);    // declare the LED's pin as output
  Serial.begin(9600);        // connect to the serial port
}

void loop () {
  if (Serial.available() > 9)  {    //if bytes available in the Serial buffer...
      for (q=0; q<8; q++) {         // for each byte
      bufferArray[q] = Serial.read();        // put into array
     }
  }
   if (bufferArray[0] =='S' ){      // if new bytes have been recieved

   val = bufferArray[1];      // store high byte of rpm
   }
   
   // if the stored value is a single-digit number, blink the LED that number
  if (val > '0' && val <= '9' ) {
    val = val - '0';          // convert from character to number
    for(int i=0; i<val; i++) {
      Serial.println("blink!");
      digitalWrite(led,HIGH);
      delay(1000);
      digitalWrite(led, LOW);
      delay(1000);
    }
    //Serial.println();
  }
}


If my board recive data, I see light blinks

tutorial
http://x-sim.de/forum/viewtopic.php?f=40&t=155

All firewall protect off
User avatar
AlexNester
 
Posts: 9
Images: 0
Joined: Tue 24. Sep 2013, 17:49
Location: Ukraine
Has thanked: 0 time
Been thanked: 0 time

Re: Uso not send commands to device

Postby AlexNester » Tue 22. Jul 2014, 20:04

wow I find the problem :idea:

Uso send axis information only when game not paused, pff


ok, I have else one question

My own interface plugin, for my HID,
will it work in demo version ?
plugin will send data to synaptrix section?
User avatar
AlexNester
 
Posts: 9
Images: 0
Joined: Tue 24. Sep 2013, 17:49
Location: Ukraine
Has thanked: 0 time
Been thanked: 0 time

Re: Uso not send commands to device

Postby sirnoname » Tue 22. Jul 2014, 21:21

will work.
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Re: Uso not send commands to device

Postby AlexNester » Tue 22. Jul 2014, 22:37

:!: :!: :!: !!!Thanks!!! :!: :!: :!:
User avatar
AlexNester
 
Posts: 9
Images: 0
Joined: Tue 24. Sep 2013, 17:49
Location: Ukraine
Has thanked: 0 time
Been thanked: 0 time

Re: Uso not send commands to device

Postby sirnoname » Thu 24. Jul 2014, 00:24

By the way, a plugin needs some identification in the code to be recognized as a interface plugin, the names have changed in X-Sim3 to "interface3". I post the sample code here tomorrow.
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times


Return to New users start here - FAQ

Who is online

Users browsing this forum: No registered users and 8 guests