Arduino Forum

Using Arduino => Sensors => Topic started by: KalleKobra on Jan 15, 2019, 10:39 pm

Title: Hamlin 59630
Post by: KalleKobra on Jan 15, 2019, 10:39 pm
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!
Title: Re: Hamlin 59630
Post by: outsider on Jan 16, 2019, 01:14 am
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.
Title: Re: Hamlin 59630
Post by: KalleKobra on Jan 16, 2019, 04:49 pm
 :) Super Thanks a lot