Patient description: The patient is a 24-year-old man who has had type 1 diabetes for 11 years. He presents to the emergency room with hyperglycemia and concern for possible diabetic ketoacidosis after not taking his insulin for 3 days. The patient reports that he is currently homeless and has lost his supply of insulin, syringes, glucometer, and glucose testing supplies. The patient states that at the time of his initial diagnosis with type 1 diabetes he was hospitalized with a glucose value >1000 mg/dL. At the time, he was experiencing polyuria, polydipsia, and polyphagia. He reports that he has been on insulin since the time of his diagnosis, and he has never been prescribed oral agents for diabetes management. Most recently, he has been using insulin glargine 55 units once daily, and insulin aspart sliding scale 3 times daily. The patient has had previous episodes of diabetic ketoacidosis, for which he was hospitalized. With this episode of hyperglycemia, he is not experiencing any nausea, vomiting, or abdominal discomfort, and he appears well. His lab studies showed: A1c: 11.3% Creatinine: 0.9 mg/dL with eGFR >60 mL/min Aspartate aminotransferase (AST): 17 U/L Alanine aminotransferase (ALT): 14 U/L Beta-hydroxybutyrate: 0.1 mmol/L Bicarbonate: 25 mEq/L Anion

Clinical trial eligibility criteria: eligible ages (years): 21.0-65.0,  Type 1 Diabetes Mellitus ≥21 and <65 years old with clinical diagnosis of Type 1 Diabetes Mellitus for at least 1 year. 2. for documented hyperglycemia (at least 1 criterion must be met): 1. Fasting glucose ≥126 mg/dL confirmed 2. Two-hour Oral Glucose Tolerance Test (OGTT) glucose ≥200 mg/dL confirmed 3. HbA1c ≥6.5% documented confirmed 4. Random glucose ≥200 mg/dL with symptoms 3. No data at diagnosis is available but the participant has a convincing history of hyperglycemia consistent with diabetes. for requiring insulin at diagnosis (at least 1 criterion must be met): 1. Participant required insulin at diagnosis and continually thereafter 2. Participant did not start insulin at diagnosis but upon investigator review likely needed insulin (significant hyperglycemia that did not respond to oral agents) and did require insulin eventually and used continually 3. Participant did not start insulin at diagnosis but continued to be hyperglycemic, had positive islet cell antibodies consistent with latent autoimmune diabetes (LADA) in adults and did require insulin eventually and used continually. for Type 1 Diabetes Mellitus (at least 1 criterion must be met) 4. Documented low or absent C-peptide level. 5. Documented presence of Islet Cell Cytoplasmic Autoantibodies (ICA) or Glutamic Acid Decarboxylase (GAD65) antibodies. 4. Use of an insulin pump to treat his/her diabetes for at least 6 months 5. Actively using a bolus calculator with the current insulin pump with pre-defined parameters for carbohydrate (CHO) ratio, insulin sensitivity factor (ISF), and target glucose 6. HbA1c between 5.0% and 10.5% as measured with DCA2000 or equivalent device 7. Not currently known to be pregnant, breast feeding, or intending to become pregnant (females) 8. Demonstration of proper mental status and cognition for the study. 9. Willingness to avoid consumption of acetaminophen-containing products during the study interventions involving continuous glucose monitor use. 10. If on antihypertensive, thyroid, anti-depressant or lipid lowering medication, have stability on the medication for at least 2 months prior to enrollment in the study  Clinical diagnosis of Type 2 Diabetes Mellitus 2. Diabetic ketoacidosis within the 6 months prior to enrollment 3. Severe hypoglycemia resulting in seizure or loss of consciousness in the 3 months prior to enrollment 4. Pregnancy, breast feeding, or intention of becoming pregnant 5. Uncontrolled arterial hypertension (diastolic blood pressure >90 mmHg and/or systolic blood pressure >160 mmHg) 6. Hematocrit <36% (females); <38% (males) 7. Uncontrolled thyroid disease or thyroid replacement as determined by a thyroid-stimulating hormone (TSH) out of the UVa reference range. 8. Impaired hepatic function measured as alanine aminotransferase or aspartate aminotransferase >2 times the upper limit of normal 9. Impaired renal function measured as creatinine >1.5 mg/dL 10. Conditions which may increase the risk of hypoglycemia such as known coronary artery disease (e.g. history of myocardial infarction, acute coronary syndrome, therapeutic coronary intervention, coronary bypass or stenting procedure, stable or unstable angina, episode of chest pain of cardiac etiology with documented EKG changes, or positive stress test or catheterization with coronary blockages >50%), congestive heart failure, history of cerebrovascular event, seizure disorder, syncope, adrenal insufficiency, neurologic disease or atrial fibrillation 11. Additional conditions which may inhibit the ability to perform exercise on a stationary bike (e.g. injury to or immobility of limbs, neuromuscular disease, exercise-induced asthma requiring inhaler use within the last 12 months or clinically impaired pulmonary function) 12. Use of a medication that significantly lowers heart rate (beta blockers, reserpine, guanethidine, methyldopa, clonidine, cimetidine, digitalis, calcium channel blockers, amiodarone, antiarrythmic drugs, or lithium) 13. History of a systemic or deep tissue infection with methicillin-resistant staph aureus or Candida albicans 14. Use of a device that may pose electromagnetic compatibility issues and/or radiofrequency interference with the continuous glucose monitor (CGM) (implantable cardioverter-defibrillator, electronic pacemaker, neurostimulator, intrathecal pump, and cochlear implants) 15. Medical condition requiring use of an acetaminophen-containing medication that cannot be withheld for the study admissions. 16. Psychiatric disorders that would interfere with study tasks (e.g. inpatient psychiatric treatment within 6 months prior to enrollment, uncontrolled anxiety or panic disorder) 17. Mental incapacity, unwillingness or language barriers precluding adequate understanding or cooperation 18. Current or recent alcohol or drug abuse by patient history 19. Medical conditions that would make operating a CGM, cell phone or insulin pump difficult (e.g. blindness, severe arthritis, immobility) 20. Any skin condition that prevents sensor or pump placement on the abdomen or arm (e.g. bad sunburn, pre-existing dermatitis, intertrigo, psoriasis, extensive scarring, cellulitis) 21. Known microvascular (diabetic) complications (other than diabetic non-proliferative retinopathy), such as history of laser coagulation, proliferative diabetic retinopathy, known diabetic nephropathy (other than microalbuminuria with normal creatinine) or neuropathy requiring treatment 22. Active gastroparesis requiring current medical therapy 23. If on antihypertensive, thyroid, anti-depressant or lipid lowering medication, lack of stability on the medication for the past 2 months prior to enrollment in the study 24. Known bleeding diathesis or dyscrasia 25. Known allergy to medical adhesives, components of the insulin pump insertion set or continuous glucose monitor sensor 26. Anticoagulant therapy other than aspirin 27. Oral steroids 28. Active enrollment in another clinical trial 29. Unwillingness to avoid acetaminophen while the continuous glucose monitor is in use. 30. Unwillingness to withhold dietary supplements two weeks prior to admission and for the duration of the study participation. 31. Subjects with basal rates less than 0.05. Restrictions on use of other drugs or treatments 1. Pramlintide, liraglutide and exenatide will be held for the duration of the study intervention. 2. Oral steroids are excluded 3. Anticoagulant therapy other than aspirin is excluded 4. Acetaminophen will not be allowed while the continuous glucose monitor is in use 5. Dietary supplements will be withheld two weeks prior to admission and for the duration of study participation 6. Beta blockers, reserpine, guanethidine, methyldopa, clonidine, cimetidine, digitalis, calcium channel blockers, amiodarone, antiarrythmic drugs, and lithium are excluded