Search results

  1. B

    Joystick range issue (960 - 63929)

    It's not very pretty or efficient, but this seems to have resolved the issue. the bit I'm using: long xValue; long yValue; long zValue; xValue = (map(analogRead(24),16,996,0,1024))*64; yValue = (map(analogRead(25),16,996,0,1024))*64; zValue =...
  2. B

    Joystick range issue (960 - 63929)

    That looks pretty dang complicated and quite a bit over my head. If the code I quoted above isn't what I should be using to see what my analogRead is then what should I be doing? It seems like I should be able to scale whatever my values are with map(), but I haven't been able to get that to...
  3. B

    Joystick range issue (960 - 63929)

    I checked the analogue for one of the potentiometers outputs using the code below. Got a range of about 60 to about 3939. Not sure what that means! uint16_t CH01 = A13; uint16_t min_value = 0xffff; uint16_t max_value = 0; uint16_t last_value = 0; void setup() { while (!Serial) ; //...
  4. B

    Joystick range issue (960 - 63929)

    Thanks for the help, I pulled those lines out. With those removed I'm getting 1024 to 63800 with both reading being a bit unstable (i.e. flickering between different numbers). Regardless, it still shouldn't be starting at anything apart from 0, correct?
  5. B

    Joystick range issue (960 - 63929)

    Size is set to 64. So, that makes sense why the numbers are higher - but shouldn't it still start at 0?
  6. B

    Joystick range issue (960 - 63929)

    Trying to make a button box with buttons, encoders, and potentiometers. Everything is working, but I'm running into an issue with the potentiometers. For some reason they don't seem to output the full range. The anlogueRead output was 15 through 998, but then randomly when I switched to from...
  7. B

    Four Rotary Encoders on HID game controller?

    So this works, but I am unable to get it to work within the code that does my buttons and potentiometers. //Six rows on pins 0, 1, 2, 3, 4, 5 //Seven columns on pins 23, 22, 21, 20, 19, 18, 17, //Four rotary encoders, pins (33,34) (36,37) (38,39) (40,41) //Three potentiometers, pins 24, 25, 26...
  8. B

    Four Rotary Encoders on HID game controller?

    I actually managed to get it work by adding a delay. Welcome help on making this nicer or catching any issues: #include "Arduino.h" #include "EncoderTool.h" using namespace EncoderTool; Encoder e1; Encoder e2; Encoder e3; Encoder e4; //Encoder 1 void onEncoderChanged1(int value, int...
  9. B

    Four Rotary Encoders on HID game controller?

    Thanks for this - I got it to send the button presses, but it just holds the button. Any chance you could offer some advice on how to have it do a momentary press? i.e. one tick is one press? This is what I've done so far: #include "Arduino.h" #include "EncoderTool.h" using namespace...
  10. B

    Four Rotary Encoders on HID game controller?

    Thank you. I'll give this a shot later - will I need to manually add those libraries?
  11. B

    Four Rotary Encoders on HID game controller?

    Working on a button box for sim games and trying to get four encoders to work in my code, but I have very very little experience. The box is all wired up, and I have been able to test that the four encoders are working by doing some tests with the serial output. What I am missing is how to...
  12. B

    Teensy Joystick HID and encoder assign to buttons

    Any chance this got fixed? I'm very new and trying to figure all of this out :)
  13. B

    Help fixing issue with mouse jumping to center of screen

    Thank you, I did actually do this! I had found the answer on another thread elsewhere.
  14. B

    Help fixing issue with mouse jumping to center of screen

    Thanks - sorry, I'm so new to this I'm not really sure what I should be providing. I tried to add in the line you recommended to increase the numbers. I'm still having some issues with a few of the buttons not registering but I can't tell if that is an issue with my wiring or code - but it's...
  15. B

    Help fixing issue with mouse jumping to center of screen

    Been working on a game controller with Teensy 4.1 Tried to use in game and the cursor keeps flickering and jumping back into the center of the screen. Wondering what is the issue here and if there is a simple fix. Background details: I have been using Teensy as a game controller (Keyboard +...
Back
Top