All tasks below are fully automatic. This program displays all the robot points for 6 servos on a web page. Using buttons on the web page you can adjust them, jog between points and then save them to EEPROM/flash when done. Otherwise all 90 angles are lost on power off unless put in the program. Program includes a speed control function to slow down the full speed, jerky motion you get directly going between points. On boot up it reads the initial point from EEPROM and goes to it rather than jerk to the default 50% servo travel. Start/idle position is where the robot falls to on power off. Industrial robots have brakes on all axes so they never fall on power off. Program includes 3 lines for wireless uploads. Other NodeMCU projects are here: https://sites.google.com/site/nodemcu12e/ The code at the bottom has YouTube links to explain how to set up NodeMCU with Arduino IDE, how to do wireless uploads and web page HMIs.
For Plinko the ball position is sensed with a photoresistor/voltage divider circuit wired to an analog input. Background light levels are recorded at position 5 when the slots are empty then compared to the difference in light level to determine which slot the ball is in at position 0. Loads different initial point data depending on the ball position. 4 more analog inputs were added with ADS1115 expander on I2C. Same two I2C wires support a Real Time Clock, 128 digital I/O with MCP23017s (16 per chip), up to 20 16-bit analog inputs, 32 12-bit analog outputs and 992 PWM servos with other expander chips.
Details on how to use the ADS1115 are here:https://youtu.be/_J8uGesYvl8
// 6 DOF Robot demo program including positions saved to EEPROM so not lost on power failure
// Now includes slow JOG+ and JOG- to move slowly forward and backward between points.
// Now includes INC button to toggle between 1 and 5. Can increment or decrement values by 1 or 5 to save clicks when making big changes.