2022-03-27, 07:32 PM
You can use analog write on an external attiny, sure.. but if you try that in the main motor.ino it will potentially have issues. Always let us know what works!
In any case... bad voltage is nothing to do with current measurement shunt. It is voltage measurement. You will see on the schematic:
https://pypilot.org/schematics/hbridge_controller.pdf
A0 has 10k and 560 ohm resistor. You just need to add these. bad voltage ensures it stops the motor if the voltage is too low or high (avoid damage, also useful as it beeps if your battery voltage is way off...)
Anyway... you can also check the source code to motor.ino and modify/disable it to avoid this quite easily as well.
In any case... bad voltage is nothing to do with current measurement shunt. It is voltage measurement. You will see on the schematic:
https://pypilot.org/schematics/hbridge_controller.pdf
A0 has 10k and 560 ohm resistor. You just need to add these. bad voltage ensures it stops the motor if the voltage is too low or high (avoid damage, also useful as it beeps if your battery voltage is way off...)
Anyway... you can also check the source code to motor.ino and modify/disable it to avoid this quite easily as well.