Change PWM output of arduino based off of current gear.
I have been using an Arduino to run a tachometer with BeamNG/Rigs of Rods, but I am wanting to integrate it with some more things.
For example, I have a shifter that I've hacked together from a Dodge Journey that is ran by an arduino. Currently it only works by making sure the game and the shifter are in the same spot. Then as you shift it sends keyboard commands to shift the game to the appropriate gear. Only problem is, there is no feedback loop so the shifter has no idea if the truck is in the correct gear. For example, if you hit the keyboard button to shift it, the shifter will have no idea and it will shift into the wrong gears.
So I know SimHub supports knowing what gear the truck is in, I was thinking of attaching this value to a certain PWM value of a pin, then I could wire the two arduinos together and the shifter could read the PWM value and calculate what gear the truck was actually in.
Is this possible?
Thanks for your time!