ESP_Robot_Jog_Inc_Plinko.ino

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

ino - 33.24 kB - 02/20/2021 at 17:11

Download

ESP_Robot_Jog_Inc.ino

// 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.

ino - 27.15 kB - 02/14/2021 at 16:52

Download