Go Down

Topic: Hamlin 59630 (Read 73 times) previous topic - next topic

KalleKobra

I have problem communication or getting relevant values from an Hamlin 59630. Tried both did readAnalog() and readDigital(). Yes Im a beginner! Happy to receive suggestions!

outsider

#1
Jan 16, 2019, 01:14 am Last Edit: Jan 16, 2019, 01:16 am by outsider
Assuming you mean a float switch, connect one switch wire to GND, the other to a digital input pin, lets say pin 4,
Code: [Select]

void setup()
{
  pinMode(4,INPUT_PULLUP);
  pinMode(LED_BUILTIN,OUTPUT);
}
void loop()
{
  digitalWrite(LED_BUILTIN, digitalRead(4));
}

The onboard LED should switch ON / OFF when you move the float.

KalleKobra

 :) Super Thanks a lot

Go Up