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-80.0,  Type 2 Diabetes Treated With Insulin English-speaking 2. Males and female adult subjects admitted to Boston Medical Center to a medical or surgical floor. 3. Consultation by the Inpatient Diabetes Service at Boston Medical Center is required prior to consent. 4. Age ≥ 21 and <= 80 years. 5. Diagnosed with type 2 diabetes at least 180 days prior to screening. 6. Hyperglycemia during admission, as defined by a point of care and/or venous blood glucose ≥ 140 mg/dL. 7. Prior to admission subjects must be using one of the following for outpatient diabetes management: 1. Insulin 2. ≥ 2 oral/injectable agents 3. One oral/injectable agent with a hemoglobin A1c of ≥ 8% within 3 months of enrollment. 8. Patients who are expected to remain hospitalized for a minimum of 48 hours following CGM sensor placement. 9. BMI <45 kg/m^2. 10. Subjects must have insulin glargine dosing planned at bedtime for the duration of the study period. Morning and afternoon dosing of insulin glargine are exclusionary  Patients with a history of type 1 diabetes or late-onset autoimmune diabetes (LADA). 2. Treatment or plan for treatment with glucocorticoids during the index hospitalization. 3. Female patients who are pregnant (tested during hospitalization or screening) or breast-feeding during the hospitalization. 4. Patients admitted with the following conditions: diabetic ketoacidosis, hyperosmolar hyperglycemic state, solid organ transplantation, or coronary artery bypass surgery. 5. Prior diagnosis of gastroparesis or cirrhosis. 6. Acute or chronic kidney disease with a serum creatinine of ≥ 2 mg/dL at the time of screening. 7. Clinically significant nausea and/or vomiting or unable to consume more than 30 grams of carbohydrate at each meal. 8. Patients expected to receive nothing by mouth (NPO) for >24 hours. 9. Use of continuous or intermittent enteral feeding or parenteral nutrition. 10. Patient receiving aspirin and/or vitamin C during the hospitalization. 11. Any mental condition rendering the subject unable to provide informed consent. 12. Patients currently incarcerated. 13. Patients using >1 unit/kg/day of insulin prior to admission. 14. Insulin pump usage within the 2 weeks prior to or during admission. 15. Patients currently using real-time continuous glucose monitoring (CGM) or personal flash glucose monitoring system (FGM). 16. Patients with a history of an allergy to any of the types of insulin or one of the excipients in the insulin used in the study