Cleric-K / vJoySerialFeeder

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

Pin Connection Issue #32

Closed huseyinctlbs closed 2 years ago

huseyinctlbs commented 4 years ago

Hi. I have tried your software on arduino uno and was succesfull on axises. But i have problem on button mapping. Does we have to use pullup ressistor? Cant we use arduino's internal resistor? I think if we can do it, we can just connect the buttons between GND and digital pins without resistors. I have tried change the code but the connection between software and arduino has error after that.

Cleric-K commented 4 years ago

Yes, it should work fine with the internal pullups. Can you show me your code?

huseyinctlbs commented 4 years ago

Thanks a lot for your quick reply :) i didnt change too much thing in your code. Just edited ino file which you have shared. I have tried to declare the digital pin 2 as input like pinMode(2, INPUT) end then i have make it logic 1 with digitalWrite(2 ,HIGH) but maybe i have writing tese codes wrong place on your code. I have putted these codes under the void setup() . I have just tried that. Would you reccomend another way to me?

Cleric-K commented 4 years ago

The correct way would be to use pinMode(2, INPUT_PULLUP); and no need for the digitalWrite.

Place this in the setup() function - one line for each pin.