resetup of the raspberry pi after SD card broken

This commit is contained in:
Ryan Tang 2024-05-09 15:16:30 -04:00
parent b9033521a2
commit 4efb01b3f5
4 changed files with 11 additions and 5 deletions

View File

@ -7,7 +7,7 @@ import influxdb_client
from influxdb_client import InfluxDBClient, Point, WritePrecision from influxdb_client import InfluxDBClient, Point, WritePrecision
from influxdb_client.client.write_api import SYNCHRONOUS 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() first_line = f.readline()
@ -24,7 +24,7 @@ print(token)
ser = serial.Serial('/dev/ttyACM0', 9600, timeout=1) ser = serial.Serial('/dev/ttyACM0', 9600, timeout=1)
ser.reset_input_buffer() 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' # cmd='curl -s -XPOST "http://fsunuc.physics.fsu.edu:8086/write?db=interlock" --data-binary @/home/pi02/data.txt'

View File

@ -93,7 +93,7 @@ bool input_normal[16] = {
OPEN, // 0 , lvl= 0, Reset switch OPEN, // 0 , lvl= 0, Reset switch
CLOSED, // 1 , lvl= 3, Emergency source trip switch CLOSED, // 1 , lvl= 3, Emergency source trip switch
CLOSED, // 2 , lvl= 1, Cage door contact, level-1 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 OPEN, // 4 , lvl= 2, Vacuum condition - gnd, level-2
CLOSED, // 5 , lvl= 3, Tritium monitor CLOSED, // 5 , lvl= 3, Tritium monitor
CLOSED, // 6 , lvl= 3, Control Room Emergency Switch CLOSED, // 6 , lvl= 3, Control Room Emergency Switch

View File

@ -83,8 +83,14 @@ void setup() {
* Send start-up notice to logging server * 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 // Startup input check
app_Tasks(); //app_Tasks();
} }

View File

@ -3,7 +3,7 @@ Description=Listening P1AM output
After=network.target # Adjust the target as needed After=network.target # Adjust the target as needed
[Service] [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 #WorkingDirectory=/home/pi02/Multi-SNICS_Interlock/ # Optional, set the working directory
#Restart=always #Restart=always
#StartLimitIntervalSec=10 #StartLimitIntervalSec=10