adding void...

This commit is contained in:
Stefan Kögl 2012-10-01 21:03:30 +02:00
commit 1a303ebc6c
2 changed files with 74 additions and 0 deletions

21
CMakeLists.txt Normal file
View File

@ -0,0 +1,21 @@
#=============================================================================#
# Author: QueezyTheGreat #
# Date: 26.04.2011 #
# #
# Description: Arduino CMake example #
# #
#=============================================================================#
set(CMAKE_TOOLCHAIN_FILE ArduinoToolchain) # Arduino Toolchain
cmake_minimum_required(VERSION 2.8.5)
project(ReflowCtl C CXX)
set(ARDUINO_DEFAULT_BOARD diecimila) # Default Board ID, when not specified
set(ARDUINO_DEFAULT_PORT /dev/ttyUSB0) # Default Port, when not specified
generate_arduino_firmware(reflowctl
SKETCH reflowctl
PORT /dev/ttyUSB0
BOARD diecimila)

53
reflowctl/reflowctl.ino Normal file
View File

@ -0,0 +1,53 @@
unsigned int time = 0; // profile seconds
unsigned int degrees = 25; // actual oven temp
unsigned int Ts_max = 200; // °C
unsigned int Ts_min = 150; // °C
unsigned int Tp = 260; // 245-260°C
unsigned int rampup_rate = 3; // 3°C/s
unsigned int preheat_duration = 100; // 60-180s
unsigned int tal = 217; // 217°C
unsigned int tal_duration = 100; // 60-150s
unsigned int peak_duration = 30; // 20-40s
unsigned int rampdown_max = 6; // 6°C/s max
unsigned int time_max = 480; // 8*60s max
byte state; // 0 = start, 1 = preheat, 2 = tal, 3 = max, 4 = rampdown
void setup() {
pinMode(13, OUTPUT);
Serial.begin(9600);
}
void get_temp() {
}
void loop() {
time = millis() / 1000;
// wait a second so as not to send massive amounts of data
delay(1000);
switch (state) {
case 0:
if (degrees > Ts_min) {
state++;
}
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
default:
break;
}
if (degrees > 60) {
Serial.print("seconds: ");
Serial.println(time);
}
}