resetup of the raspberry pi after SD card broken
This commit is contained in:
parent
b9033521a2
commit
4efb01b3f5
|
@ -7,7 +7,7 @@ import influxdb_client
|
|||
from influxdb_client import InfluxDBClient, Point, WritePrecision
|
||||
from influxdb_client.client.write_api import SYNCHRONOUS
|
||||
|
||||
with open('/home/pi02/influx_token.txt', 'r') as f:
|
||||
with open('/home/pi03/influx_token.txt', 'r') as f:
|
||||
first_line = f.readline()
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@ print(token)
|
|||
ser = serial.Serial('/dev/ttyACM0', 9600, timeout=1)
|
||||
ser.reset_input_buffer()
|
||||
|
||||
outFile = "/home/pi02/data.txt"
|
||||
outFile = "/home/pi03/data.txt"
|
||||
|
||||
# cmd='curl -s -XPOST "http://fsunuc.physics.fsu.edu:8086/write?db=interlock" --data-binary @/home/pi02/data.txt'
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ bool input_normal[16] = {
|
|||
OPEN, // 0 , lvl= 0, Reset switch
|
||||
CLOSED, // 1 , lvl= 3, Emergency source trip switch
|
||||
CLOSED, // 2 , lvl= 1, Cage door contact, level-1
|
||||
CLOSED, // 3 , lvl= 3, Fume hood flow switch, level-3
|
||||
OPEN, // 3 , lvl= 3, Fume hood flow switch, level-3
|
||||
OPEN, // 4 , lvl= 2, Vacuum condition - gnd, level-2
|
||||
CLOSED, // 5 , lvl= 3, Tritium monitor
|
||||
CLOSED, // 6 , lvl= 3, Control Room Emergency Switch
|
||||
|
|
|
@ -83,8 +83,14 @@ void setup() {
|
|||
* Send start-up notice to logging server
|
||||
######*/
|
||||
|
||||
currentState = startup;
|
||||
for( int i = 0; i < 16; i++) input[i] = 0;
|
||||
|
||||
P1.writeDiscrete(LOW,out2); //Buzzer silent
|
||||
output[1] = 0;
|
||||
|
||||
// Startup input check
|
||||
app_Tasks();
|
||||
//app_Tasks();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ Description=Listening P1AM output
|
|||
After=network.target # Adjust the target as needed
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/pi02/Multi-SNICS_Interlock/Listen2Arduino.py
|
||||
ExecStart=/home/pi03/Multi-SNICS_Interlock/Listen2Arduino.py
|
||||
#WorkingDirectory=/home/pi02/Multi-SNICS_Interlock/ # Optional, set the working directory
|
||||
#Restart=always
|
||||
#StartLimitIntervalSec=10
|
||||
|
|
Loading…
Reference in New Issue
Block a user