Example project for the Rioux Chem control box
Rioux Chem Control Box
This is the example project for the Rioux Chem Control Box. I have posted some youtube videos to guide you through the hardware and software:
Rioux Chem Control Box - Hardware
http://www.youtube.com/watch?v=MoZ92GRYa4s
Rioux Chem Control Box - Software - Part I
http://www.youtube.com/watch?v=_MwaTLL4dyA==
Rioux Chem Control Box - Software - Part II
http://www.youtube.com/watch?v=j_P89izfgoQ
Diff: main.cpp
- Revision:
- 2:73a028278c5c
- Parent:
- 0:7798270c1f52
- Child:
- 3:cb48919cd5e8
--- a/main.cpp Thu Aug 06 15:02:29 2015 +0000
+++ b/main.cpp Mon Aug 31 13:00:37 2020 +0000
@@ -4,11 +4,20 @@
Timer ControlLoopTimer;
float CurrentTemperature;
+#define VT100_RED "\033[31;40m"
+#define VT100_GREEN "\033[32;40m"
+#define VT100_YELLOW "\033[33;40m"
+#define VT100_BLUE "\033[34;40m"
+#define VT100_MAGENTA "\033[35;40m"
+#define VT100_CYAN "\033[36;40m"
+#define VT100_WHITE "\033[37;40m"
+#define VT100_RESET "\033c"
+
int main()
{
int i;
-
+ char * Color = VT100_WHITE;
//This function always needs called before you do anythign wit the CHEM BOX.
InitChemBox();
@@ -62,6 +71,43 @@
{
//Call this often if you want the USB interface/Terminal
ProcessTerminal();
+ /*RS232_0.printf(" RUN\r");
+ if(ControlLoopTimer.read_ms() >= 1000)
+ {
+ ControlLoopTimer.reset();
+
+
+ PC.printf(VT100_RESET);
+
+ for(int channel=0;channel<12;channel++)
+ {
+ if(channel & 0x01)
+ Color = VT100_CYAN;
+ else
+ Color = VT100_GREEN ;
+
+
+ float ThermocoupleTemperature = ReadThermocouple(channel);
+ float InternalReferenceTemperature = ReadInternalTemperature(channel);
+
+ bool IsDisconnected = (ReadThermocouple_OC() & (1<<channel));
+
+ if(IsDisconnected == true)
+ {
+ PC.printf(VT100_WHITE"Channel %i: ",channel);
+ PC.printf(VT100_RED"disconnected\r\n");
+ }
+ else
+ {
+ PC.printf(VT100_WHITE"Channel %i: ",channel);
+ PC.printf(VT100_WHITE"%s%.2f ",Color,ThermocoupleTemperature);
+ PC.printf(VT100_WHITE"INT: ",channel);
+ PC.printf(VT100_WHITE"%s%.2f\r\n",Color,InternalReferenceTemperature);
+ }
+
+ }
+ }*/
+
/*
Eli Hughes

