How to set up Marlin to use a heated chamber?
Here is what I found to be the easiest solution. Please use this image for reference. I recommend doing these instructions once from source, since a lot of things can go wrong,  then once everything works, go back and integrate them into your existing Marlin codebase. 


Get some 5V relays to run the infrared lamps. These relays take in a 5V digital signal from an arduino pin. When the arduino activates these pins, the lamps will turn on. Get a cardboard box, line it with aluminum foil, and attach a lamp to the top of it using a lamp switch. One wire for the lightbulb goes to NO on the relay, the other goes to D-. One wire from 120V power goes to COM, the other also goes to D-. The yellow "jumper" on the relay boards I posted goes between HIGH and the middle pin. These are pins on the relay, not the MKS GEN board.
On the MKS GEN board, we will be using the X-MAX endstop as the digital pin to run the chamber. Wire the 5V pin on X-MAX to the D+ of the relay. Wire the GND pin to D- of the relay with the two other wires there. Wire pin D2 on the MKS GEN Board to IN on the relay. Bold means the pin is on the MKS GEN board. 
Clone the Marlin-2.0 repo: git clone -b bugfix-2.0.x https://github.com/MarlinFirmware/Marlin.git
In Configuration.h, change TEMP_SENSOR_CHAMBER to 1 or 11 (depends on your thermistor, might be other values.) Since we will be using the board's second extruder thermistor as the thermistor in this example, change TEMP_SENSOR_1 to 0 for now.


#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
#define TEMP_SENSOR_5 0
#define TEMP_SENSOR_BED 1
#define TEMP_SENSOR_CHAMBER 1



In the file src/pins/ramps/pins_RAMPS.h, add this line:
#define TEMP_CHAMBER_PIN 15. Note that this is the thermistor
slot usually used for a second extruder. If you're already using
this thermistor for the second extruder and want to use a different
analog pin, see this question. You'll need some resistors.
Also, around line 95 in pins_RAMPS.h, change X_MAX_PIN to use an unused pin. The number 4 is good. If you don't do this, your Chamber's digital Pin will be always "on" by default. You want it off by default, then activated by the Marlin code.
In Configuration_adv.h, change //#define HEATED_CHAMBER_PIN 44 to #define HEATER_CHAMBER_PIN 2 to use the X_MAX endstop's digital pin. 
Upload... 
Go into OctoPrint settings. Click Axes and Volume. Next to a checkbox for heated bed, there is a checkbox for heated chamber! Click that, and your chamber is active. 
If some part is wrong (e.g. lamp doesn't go on because wire came loose on relay), debug that and keep working. Check the octoprint log to make sure the C value is shown.
Once everything works, generalize these solutions to your set-up (e.g. using multiple extruders).