Changes made to get NC working
Main issues (see branch containing changes here https://github.com/precision-sustainable-ag/BenchBot/pull/5)
Not enough power for laptop, motion motion drivers, and pi
Solution: use multiple batteries instead of running it all off of one battery
Next step: bigger inverter (1000W), pure sine
Telltale error: connection timeout
Getting stuck waiting for response for ultrasonic sensor
Change
GPIO_TRIGGER_LIST
, andGPIO_ECHO_LIST
to be the pins you're using and change the length ofdist_lists
to the number of sensors you're using inRPI_ServerSensors.py
Change
N
to the number of sensors you're using ingetDistances
function insideGUI.py
BenchBot was traveling backwards
Change
directions
to be["positive","negative"]
instead of"negative","positive"]
inside theacquisition_process
functionMaybe change
wheelMotors
from[2, 3]
to[3, 2]
if still going backwards
Cannot convert infinity to int error was solved by handling
j == 1
edge case inacquisition_process
if j == 1: c = int(1000/(j)) #total distance between home and end sensor else: c = int(1000/(j-1)) #total distance between home and end sensor
Other general house keeping stuff
Release estop and reset right after initializing the MachineMotion class
Additional refactoring that has yet to be tested that can be seen here https://github.com/precision-sustainable-ag/BenchBot/pull/3
add spacing
unify naming convention
add more global vars
add timeout to pi socket connection to avoid getting stuck in loop
send gpio pins to pi via socket and extract them so they only need to be edited in GUI.py
move imports to top of GUI.py