-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bangs.pde
55 lines (47 loc) · 1.33 KB
/
Bangs.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
public void Connect() { // conect to com port bang
if(Comselected==false){
try{
serial = new Serial(this, comList[Ss], 9600);
println(comList[Ss]);
myTextarea2.setText("CONNECTED");
Comselected = true;
}
catch (Exception e){
warning.show();
warningtxt.setText("Some type of com port error");
println("Some type of com port error. Restart program");
myTextarea2.setText("COM ERROR");
}
}
else{
println("already connected");
}
}
public void Save_run() { // set path bang
selectInput("Select a file to process:", "fileSelected");
}
void fileSelected(File selection) {
if (selection == null) {
println("Window was closed or the user hit cancel.");
}
else {
file2 = selection.getAbsolutePath();
println("User selected " + file2);
// myTextarea.setText(file2);
///////////////////////////////////////
// String file2 = "C:/Users/Ben/Documents/Voltammetry Stuff/log/data.txt";
try{
saveStream(file2,file1);
}
catch(Exception e){}
/////////////////////////////////////////
}
}
public void Start_Run() { // start run bang
bool = true;
myTextarea2.setColor(#D8070E);
myTextarea2.setText("RUNNING SCAN");
}
public void Intergrate_Data() { // intergrate data bang
win.show();
} //intergrate bag for popup window is in intergrat_window tab//