Cleric-K / vJoySerialFeeder

Feed Virtual Joystick driver with data from a serial port
GNU General Public License v3.0
258 stars 55 forks source link

"Version of Driver(219) does NOT match DLL Version(218)" Error shows after a succeseful input test #46

Closed Juarezdoposto closed 3 years ago

Juarezdoposto commented 3 years ago

After testing a code that sends a input based on a piezo press,the vJoy Serial Feeder read that input okay. But after i disconnected it from the channels and unplug my Arduino Uno ,then pluged it again, he doesnt connect and always shows that message: "Version of Driver(219) does NOT match DLL Version(218)"

Ps:it already happened before but then i restarted my computer and woked for 1 more time,then message appears again,and second time i restart everthing including my computer i receive that message again.

The code i submitted and worked 2 times:

`#include "ibus.h"

define UPDATE_INTERVAL 10 // milliseconds

define BAUD_RATE 115200

IBus ibus(1);

int lim=350;//limite do piezo pra ativar int atraso = 43;//tempo de delay entre sons int apertou=LOW; int pad;

void setup() { Serial.begin(BAUD_RATE); } void loop() {

unsigned long time = millis();

pad = analogRead(A0);///salva o valor maximo obtido pelo piezo no vetor pad

if (pad > lim) { apertou=HIGH; } else { apertou=LOW; } ibus.begin();

ibus.write(apertou == HIGH ? 1023 : 0 );

ibus.end();

time = millis() - time; // time elapsed in reading the inputs if(time < UPDATE_INTERVAL) // sleep till it is time for the next update delay(UPDATE_INTERVAL - time); //Fim da comunicação

}`

Cleric-K commented 3 years ago

Download the appropriate version from http://github.com/Cleric-K/vJoySerialFeeder/releases/tag/v1.6

Juarezdoposto commented 3 years ago

thank you it worked,just one more question,is there is a way that a i can calibrate a button without having it pressed? I making a drum so i can press him,it reads impact,so everytime i calibrate i receive an error,

Cleric-K commented 3 years ago

Yes, just type in the threshold values manually. Calibration is simply a way to detect these values automatically but you can always input them by hand.

Juarezdoposto commented 3 years ago

Yes, just type in the threshold values manually. Calibration is simply a way to detect these values automatically but you can always input them by hand.

Where exactly i do this ?for getting my output going green on the screen,in the part of calibration i dont find nothing to use as high

Cleric-K commented 3 years ago

See https://github.com/Cleric-K/vJoySerialFeeder/blob/master/Docs/Quickstart.md you have to define the threshold value of the channel. When the channel is above that value the button will be considered pressed (or depressed if you use invert).

Juarezdoposto commented 3 years ago

very thank you! i made my diy drum game controller work