The Start

Hi, What and Why

Plug it in

Rule number 1

Water Sensor

Sound Sensor


Tri Colour LED

RTC (Real Time Clock) DS1302

RTC (Real Time Clock) DS3231

Matrix LED step 1


Stepper Motor

LCD revisited with PCF8574T

Humidity Sensor

Shift Register

RFID tags (RC-522)

7 Segment display

Ultrasonic distance sensor

5V regulator

analogRead and analogWrite

Wiring an Array of Switches

The next step

Other things I have bought

Infra red and Processing

Programming a separate arduino chip

Creating your own PCB

L293D for a DC motor

4 digit 7 segment display

Starting with motors

RF433 Wireless Comms

Sort a character array

More stuff

I2C devices (SDA,SCL)

I2C scanner

SPI devices (MOSI,MISO)

HMC5883L Compass

MMA7361 Accelerometer

Added projects

Message Display System

4WD robot car
4WD robot car II

4WD robot car COMPLETE

MP3 Player

Water Sensor

A water sensor. water sensor

There are 3 clearly marked pins; +, - and S. + is +5V, - is GND and S is some kind of sensor - so I investigated.

Wired up.

Arduino 5V -> breadboard -> resistor -> LED -> WaterSensor +

WaterSensor - -> breadboard -> Arduino GND

The yellow pin from the water sensor is now ready to read.
water sensor

This is the code that I used.

Read the water sensor. Try reading the analog value, and / or the digital value, to see what returns.
int analogInputPin   = 3;
int digitalInputPin  = 2;
int wait = 1000; 
long analogInputVal;
int digitalInputVal;

void setup()
		pinMode(analogInputPin,   INPUT);
		pinMode(digitalInputPin,   INPUT);

void loop()
		analogInputVal = analogRead(analogInputPin);
		digitalInputVal = digitalRead(digitalInputPin);
		Serial.print("Digital is ");
		Serial.print(" and Analog input is ");
		Serial.println(" "); // println, to end with a carriage return
		delay(wait); // Pause for 'wait' milliseconds before resuming the loop
When I press my finger against it :
water sensor
This is my screenshot :
water sensor

After this, I experimented with different resistor values, to see the effect on the output, and also wired it up to the digital input, to see when it would switch from a reading of 0 to a reading of 1.