From 2080a88a7a2c3f0a29b4c0321a345830a32be077 Mon Sep 17 00:00:00 2001 From: James Devine Date: Sat, 23 Apr 2016 18:00:05 +0200 Subject: [PATCH] Pulled out the MAX1932 voltage set value to a variable in the start of the code. Allows for it to be changed more easily to change SIPM type from avansid to hammamatsu. --- cosmicpiintheafternoon.ino | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cosmicpiintheafternoon.ino b/cosmicpiintheafternoon.ino index 479d46c..2139452 100644 --- a/cosmicpiintheafternoon.ino +++ b/cosmicpiintheafternoon.ino @@ -63,6 +63,10 @@ double magx = 0; double magy = 0; double magz = 0; int currentval = 0xFF; + +//this is the target voltage for the SIPM supply from the MAX1932 +int stablevoltage = 0x6D; + long exacttime = 0; int uptime = 0; String outputbuffer = ""; //write all the outputs to a buffer and then fmacro it out @@ -101,7 +105,7 @@ void setup() digitalWrite(slaveAPin, LOW); SPI.begin(); Serial.println(F("ramping start")); - ramp(0x6D); + ramp(stablevoltage); }