monitoring 16 analog inputs

skypickle

Active member
I need to monitor 16 potentiometers and present that data to a windows pc. Windows can receive analog data and interprets that as an 'axis of a game controller'.

Can I flash a teensy 4.1 with mmjoy2?

The other problem is that windows only accpts 8 axes per usb input. As far as I know. Unless someone knows a way around this.

My Rube goldberg solution is to have two microcontrollers each connected to a usb hub in a box. The usb hub would connect to the pc.

Is there a better way?
 
A quick web-search for mmjoy2 did not reveal any editable Arduino code to modify for more Analog inputs on a range of supported boards including Teensy3.2 or for that matter, to work on a different type of Teensy.

The Rube goldberg approach may be the way to go unless you ditch mmjoy2 and write code to get TeensyX.X to do what you want.
 
A quick web-search for mmjoy2 did not reveal any editable Arduino code to modify for more Analog inputs on a range of supported boards including Teensy3.2 or for that matter, to work on a different type of Teensy.

The Rube goldberg approach may be the way to go unless you ditch mmjoy2 and write code to get TeensyX.X to do what you want.


Even if I wrote my own arduino code, I dont know any way to monitor more than 8 analog inputs with a single microcontroller. I suppose I could use an analog to digital converter and pass its output to the microcontroller. Then I could send as many signals as I want to windows. I think freejoy allows the definition of a virtual axis from pairs of digital inputs
 
I dont know any way to monitor more than 8 analog inputs with a single microcontroller.

Teensy 3.2 has 21 analog input pins. Teensy 4.0 has 14 analog inputs pins. So you can simply use more than 8 the normal way. But many of them are on the bottom side pads, so connecting to them involves soldering wires or other creative ways of accessing those physical locations. On the software side, they with with analogRead() the same way as the others.

To connect more than the available pins, you could use mux chips like 74HC4051. On the USB MIDI page, scroll down to "Connecting Many Buttons & Knobs/Sliders".



Can I flash a teensy 4.1 with mmjoy2?

I'm not familiar with mmjoy2. Can you give a link or detailed info?



The other problem is that windows only accpts 8 axes per usb input. As far as I know. Unless someone knows a way around this.

For this question, I don't know an answer. I don't use Windows much. Maybe people who know Windows better might know a way.

I can tell you we have code for many joystick axes which is disabled by default, but you can enable it by editing usb_desc.h and increase the joystick endpoint size. See the comments in that code. I can confirm the joystick test programs on Linux do indeed read the many extra axes and other features. But on Windows, the control panel never shows more than 8 axes.
 
thank you for your reply. I never would have discovered the midi angle on my own.

mmjoy2
https://github.com/MMjoy/mmjoy_en/wiki
freejoy
https://github.com/FreeJoy-Team/FreeJoyWiki

These work with the teensy 2++ so I imagine they would work on the 4.1.

Note, the Teensy 2 and Teensy 2++ are completely different processors (ATmega 32u4 if memory serves) than the ARM based Teensy LC, 3.x, and 4.x processors. Hopefully it will work straight out of the box, but it might be they use a lot of things that are specific the 32u4 processors.
 
I looked a MMjoy briefly. Downloaded MMJoy2.7z. Looks like Windows only software which had pre-compiled images for old AVR boards. Didn't see any source code for the firmware is programs onto boards. Unless that code is published somewhere, odds of getting this to work on any newer Teensy aren't good.

Two Teensy 2.0 boards is probably your best path, if you're going to use this software.
 
Back
Top