## Sous Vide: Code Snippet

Writing code for the temperature sensor to work with our A3BU proved to be too difficult to be completed in the time allotted. However, code was written, using an empty read temperature function, to show how the sensor would be implemented in our design. Essentially, the user inputs a set temperature and the program uses the set temperature to approximate the power needed to reach that temperature. The sensor then reads a temperature in every second until the water is within two degrees of the set point. If the water temperature does not reach that interval within thirty minutes the power is increased. If the water temperature is greater than the interval the power will be decreased every five minutes until the set point is reached.

(Instructor note: this was a 1-Wire temp sensor. For high temperatures an analog thermocouple reader chip could be used with an ADC. The AD595 chip is user-friendly but it eats a large part of a \$25 project budget)

//Decrements duty cycle if temperature is greater than two degrees of set point
if(temperature>(i_temp+2)){
d_c=d_c-1;//Increments duty cycle
s_flag=0;//Sets seconds flag to 0
}

//Enters loop while water temperature is greater than input temperature
while(temperature>(i_temp+2)){
temperature=ds18b20_gettemp();//Gets temperature
snprintf(prompt, OUTPUT_STR_SIZE, "Temperature: %4d",temperature);
gfx_mono_draw_string(prompt, 0, 12, &sysfont);//Display temperature
delay_s(1);
s_flag++;//Increments a seconds flag

if(s_flag==60){
m_flag++;//Increment minute flag
s_flag=0;//Sets seconds flag to 0
}

//Wait 5 minutes if water temperature is to high or temperature falls below set point
//Resets timers and breaks while loop
if(m_flag==5 || temperature<=(i_temp+2)){
s_flag=0;//Set seconds flag to 0
m_flag=0;//Set minute flag to 0
break;
}

## Superchefs-Sous Vide

The goal of this project was to make a Sous Vide machine. This Sous Vide is temperature-controlled cooking method. It requires to place ingredients in a sealed environment while being cooked under water. The food is cooked by sealing it in a vacuum sealed bag then placing that bag in a water bath. The water bath is then heated to a specific temperature, typically the temperature at which the food becomes safe to eat, especially important when meat is begin cooked. The typical temperature range is 60-90 deg C depending on the type of food. It is then left in the water bath for a long period of time until the food reaches the temperature of the water bath.

The project wasn’t successful because we weren’t able to communicate with the temperature sensor. Unfortunately we couldn’t find a library for the temperature sensor to communicate with the A3BU. (Instructor note to future teams searching for a project idea: consider adding 1-Wire code to the A3BU. You will learn a ton about timers) Other than that the project went well and we used a manual temperature sensor to make all the necessary readings and finish the project.