I’m impressed by the work this community did on creating remotes based on arduino/avr. I like them, but I would like a simpler solution using ESP32. Specifically you can get dev board which basically has everything need but accelerator control.
esp8266 is the older version. ESP32 is the new version of this controller and this dev board has battery/charger/wireless/oled/few buttons. Perhaps hall sensor and case is all whats needed.
I agree stability needs to be tested. My feeling is that using wifi/tcp is a bad choice but UDP should work. The ESPNow is probably even better. I managed to find some reports from RC world.
More testing is needed, hence looking for like-minded people to do it together.
I have built my remote using ESP32. Tried ESP-Now, Wifi, BLE but they were all a bit slow (BLE connection was a pain, but worked). Ended up using an ESP32 with nRF24L01. More wires but a lot more reliable.
ESP32 has two cores which I HIGHLY recommend getting you head around. Google “ESP32 FreeRTOS” maybe. I might see if I can find you a link somewhere.
RTOS/dual cores means that you can have one core (or thread?) reading buttons etc (timing critical) and the other core talking to the board… completely independantly.
I had real issues with how much stuff the ESP32 was having to do, and I was reading a digital encoder at the same time.
One core had interrupt handlers on two pins reading a digital encoder. The other core was sending data through the nRF24L01.
I don’t think I was doing anything incorrectly. It was about timing-critical tasks. If the MCU was busy updating a display/sending data then it was missing encoder pulses.
Just to bring in the context, 8051 handles W16 engine, with 4 precision rotary encoders, 16 injectors (PWM based) over 20 sensors communicate through CAN and final nail everything was fit inside 64K rom, 2 external interrupts, and just 2 timers
Check your code for blocks, something is blocking interrupts I don’t remember if ESP32 has jtag or etc debugger to see what your code is doing.
P.S. don’t use those Arduino style SDK those SDK are just for simple simple task
Sure. You might be right. I’m a c# developer, not a c++ dev. Dual cores works for me… I like the idea of abstracting tasks away from each other… especially in a hardware sense.
p.s. you’re probably right re: Arduino SDK. I fairly short of time so Arduino is just going to have to work for now.
I was going to write a post about the encoder idea but I am using the encoder as the throttle, pulses increment/decrement a counter and the remote talks to the board as a ‘nunchuk’ remote … essentially a position-less throttle I guess.
Might not be the best solution, a few design/safety decisions had to be figured out, but cruising/throttle response is super smooth.