Git repository: make a wireless steer, buttonbox or shifter with esp32 for little money

During my christmas holiday I have made software for a wireless wheel with paddles and buttons using a (cheap) esp32. If you made a wired solution with an arduino, maybe this software and the esp32 can replace this.

Features:
-batterywarning (i use 3 AAA batteries)
-standby mode
-bluetooth ble
-range: 30 meter (i dont know why you should need it but its a feature ;-) )
-40 hrs with the 3 aaa batteries (in standby mode this is of course a lot longer)

it's on: https://github.com/beastdjw/bluetoothGameControllerESP32
If you got any questions/remarks let me know.

Its work in progress...
 
By default all the gpio pins defined in the .ino file are enabled by default?

In other words, if I can get your firmware installed, all I need to do from there is attach buttons/encoders etc. to to correct pins and will be up and running?

Thanks for the info.
 
Upvote 0
Yeah, thats correct. When you use the latest version (from yesterday 2021 04 26) you have 25 buttons, where 4x3 gpio's are for the rotary encoders. If you need any help, drop me a message.
Gl,
Dennis
 
Upvote 0
Copied your archive to my drive, opened the .ino file and IDE knew to go get the .cpp and .h files.
Closer.
And Got it to compile for my WROOM32 board using the FireBeetle board definition.
Uploaded
AND...........................
Connected as WheelBeastDJW. Will have to take some jumpers and my new encoders to work tomorrow.
Does/Can it recharge a battery pack?
Battery recommendation?

Thank you!
 
Upvote 0
Hi Erik,
That's great news!!!
I updated some info in the Git repository.
Some gpio's need some real resistors, because they dont have internal ones. (gpio 36,39,27 and 35)

I use rechargeble 3xaaa batteries.

Further good to know: some bluetooth (cheap) adapters are not working well. I'have had one that misses too much button presses. Now I have good a solid one and no missed button presses anymore.

happy testing!
Dennis
 
Last edited:
Upvote 0
Thanks for the info Dennis.
Works but for the three pressed buttons so far. Will Check which inputs I chose.
Get this while compiling:

sketch\RotaryKnob.cpp: In member function 'boolean RotaryKnob::isReleaseNeeded()':
sketch\RotaryKnob.cpp:57:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
 
Upvote 0
sketch\RotaryKnob.cpp: In member function 'boolean RotaryKnob::isReleaseNeeded()':
sketch\RotaryKnob.cpp:57:1: warning: control reaches end of non-void function [-Wreturn-type]
}
Change the last 3 lines of that function from:
Code:
  return releaseNeeded;
  }
}
.. to
Code:
  }
  return releaseNeeded;
}
 
Upvote 0
No battery as yet. I believe I will go with a LiFePo4 since I bought 5ea. of these basic Wroom32 boards with no onboard battery control. Later I thing I'll get an

Adafruit HUZZAH32​

It has onboard LiPo charge capability.
 
Upvote 0
Cannot get the board to wake from sleep.
Can this line:
esp_sleep_enable_ext0_wakeup(BUTTON1, LOW);
I have no resistors or anything to any of the pins and everything work well except wake.
should it be LOW or HIGH? Or should LOW be replaced with 0?
 
Upvote 0
hi Erik,

Those lines are responsible to wake up from standby:

//Configure pin as ext0 wake up source for HIGH logic level to activate esp32 out of sleep (standby)
esp_sleep_enable_ext0_wakeup(BUTTON1, LOW);

Low means 0 Volt in this case. You use pull up resistors (internally), and when you push a button Low means Active. This line you have configured this button:
#define BUTTON1 GPIO_NUM_32

Further you initialise this button on line:
Button button1(BUTTON1);
And that calls the constructor, which is initialised a pullup resistor internaly:


With this line you can change the time in minutes to change the time when it goes in standby (obviously :) ), handy for debug purposes. :
#define MINUTES_TO_STANDBY 10

Good luck with testing! And let me know when any questions arises.





 
Upvote 0
thats a good idea, keep in mind that 500 mAh is a bit low regarding for this solution. I use 3000 mAh (3xAAA) and on usage time (not standby time) it holds approxiamately 40 hrs. This means 500 mAh is 7hrs.
 
Upvote 0
Your software is working well. The encoder input does not seem very sensitive. Have to roll thru quite a few detents before it registers a button click. What aspect of the code could I change to make it more responsive.
 
Upvote 0
Back
Top