/
Changes made to get NC working

Changes made to get NC working

Main issues (see branch containing changes here https://github.com/precision-sustainable-ag/BenchBot/pull/5)

  1. Not enough power for laptop, motion motion drivers, and pi

    1. Solution: use multiple batteries instead of running it all off of one battery

    2. Next step: bigger inverter (1000W), pure sine

    3. Telltale error: connection timeout

  2. Getting stuck waiting for response for ultrasonic sensor

    1. Change GPIO_TRIGGER_LIST, and GPIO_ECHO_LIST to be the pins you're using and change the length of dist_lists to the number of sensors you're using in RPI_ServerSensors.py

    2. Change N to the number of sensors you're using in getDistances function inside GUI.py

  3. BenchBot was traveling backwards

    1. Change directions to be ["positive","negative"] instead of "negative","positive"] inside the acquisition_process function

    2. Maybe change wheelMotors from [2, 3] to [3, 2] if still going backwards

  4. Cannot convert infinity to int error was solved by handling j == 1 edge case in acquisition_process

    1. 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
  5. Other general house keeping stuff

    1. Release estop and reset right after initializing the MachineMotion class

  6. Additional refactoring that has yet to be tested that can be seen here https://github.com/precision-sustainable-ag/BenchBot/pull/3

    1. add spacing

    2. unify naming convention

    3. add more global vars

    4. add timeout to pi socket connection to avoid getting stuck in loop

    5. send gpio pins to pi via socket and extract them so they only need to be edited in GUI.py

    6. move imports to top of GUI.py

Related content

Changes to Make One Branch
Changes to Make One Branch
More like this
MachineMotion
MachineMotion
More like this
Ultrasonic Sensor
Ultrasonic Sensor
More like this
X-Z Motion Controller
X-Z Motion Controller
More like this
Version 1
Version 1
More like this
Version 2
Version 2
More like this