Skip to content

readSettings()

Arnd edited this page Apr 20, 2017 · 1 revision

readSettings(Index,MinSpeed,MaxSpeed,out12V,in12V,out24V,in24V,out42V,in42V,mode);

The device settings are stored in non-volatile memory and are read as part of the library instantiation, they can also be re-read into memory at any time by calling requestSettings(). The following values are returned:

Parameter Description
Index Device index starting at 0. Invalid indices return zero values
MinSpeed The minimum compressor speed set. This value is only valid when the IN1 and IN2 pins on the FDC1 unit are used and overriden when the compressor is in either "smart", "sleep" or energy saving modes.
MaxSpeed Maximum compressor speed in the range of 1500 to 3500
out12V / out24V / out42V This is the cut-out voltage for each of the 3 input voltage ranges that are possible. The compressor will automatically turn off when the supply voltage goes below this defined value.
in12V / in24V / in42V After the compressor stops because the defined out12V/out24V/out42V voltage has been reached it will not turn on again until the supply voltage goes above this value
Mode The mode byte has various bits set according to the table on page 3 in the [FDC1 Communication Protocol](https://www.sv-zanshin.com/r/manuals/cubigel_fdc1_communication_protocol.pdf) document

Example:

CubigelClass Cubigel(&Serial1);// Instantiate with fridge on HW1 //

...
void setup() {
  uint16_t compMin,compMax,out12V,in12V,out24V,in24V,out42V,in42V;
  uint8_t  mode;
  Cubigel.readSettings(idx,compMin,compMax,out12V,in12V,out24V,
                     in24V,out42V,in42V,mode);
  Serial.print("MinSpeed ");
  Serial.println(compMin);
  Serial.print("MaxSpeed ");
  Serial.println(compMax);
  Serial.print("12V Cut-out Voltage ");
  Serial.println(out12V);
  Serial.print("12V Cut-in Voltage  ");
  Serial.println(in12V);
  Serial.print("24V Cut-out Voltage ");
  Serial.println(out24V);
  Serial.print("24V Cut-in Voltage  ");
  Serial.println(in24V);
  Serial.print("42V Cut-out Voltage ");
  Serial.println(out42V);
  Serial.print("42V Cut-in Voltage  ");
  Serial.println(in42V);
  Serial.print("Mode byte ");
  Serial.println(mode,BIN);
} // of setup

void loop() {
} // of main loop
Clone this wiki locally