My very loose plan is to connect my handlebar inputs, such as throttle, break sensor, turn signal and buttons to my vesc, read the handlebar switches-ctrls from Lisp1 and send CAN frames to my lights[^2] and horn.
How do I connect my handlebar switches to the vesc? In my example I'm have a Ennoid vesc and these wires from my handlebar:
What route should I go? The 4 options I can think of is:
Connect everything to the vesc. Can I use any of the others connecters as digital input? Such as SERVO, SWD and SDW NRF? What are these connections used for?
Connect the input buttons to something, like a RaspberryPi Pico, read the inputs of the buttons and talk to the vesc over UART (TX, RX). Still connecting the analog throttle, rear break-sensor, front break-sensor to ADC1, ADC2 and ADC3.
Read ALL of the inputs, including throttle and break sensor on the RaspberryPi Pico and talk to the vesc over UART (TX, RX).
Read the ALL of the inputs, including throttle and break sensor on a Adafruit Feather and send can frames to the vesc and read throttle and break sensor values from Lisp? Can this be done? I have no ide .
I also got my Ennoid SS-24 BMS connected the vesc by the can-bus.
Any suggestions how to do this?