Go Down

Topic: Multiple sensors (Read 1 time) previous topic - next topic


OK i have seen a lot of projects called guarduno. I have seen them using multiple sensors and just want to know how i been trying to figure out the code but my head and wall don't seem to be making any headway other then getting very soar

this is about the extent i have got so far earlie stages ( VERY EARLIE Stages )

Code: [Select]
#include <LiquidCrystal.h>
#include <Servo.h>
//2,3,4,5 data pins
//0 is rs 1 is rw
LiquidCrystal lcd(0, 1, 2, 3, 4, 5);

int fanPin = 7; // fans on
int servoPin = 6; // move fans
int waterPin = 8; // pump water for soil
int hotWaterPin = 9; // water to pump hot water around
int hotProbepin = a4; // water tank temp
int waterProbePin = a3; // watering tanks temp ie is it freezeing
int soilProbePin = a2; // soil temp is it going to freeze
int moisterPin = a5; // copper rods in soil
int internalTempPin = a0; // is it too hot and humid ?
int externalTempPin = a1; // is the humidity higher then interal  ?
int windowPin = 10; // open window

void setup()
  void loop()

ok so what i know is for temp probes u have

analog read = internaltemppin =a01

or something like that that i know i can't read all these probes instantly so these going to be a delay option but i do not understand how to well do programming its my biggest weakness  i know how to get the electronics to do what i want but not the software that works out the temps and control ls the relays , and how to display it to and lcd screen

and how to make the conditions if you noticed a problem let me know so i can sort it out i included a pic of what i am trying to control so you get some idea if you need more info let me know.


How to program it is a function of what you want to do.

Without a working logic, you cannot program it.


Well start by forgetting about doing 30 things. Pick one and get that to work, then pick another etc etc.

For example one of the temp sensors, you haven't said what they are but I guess they provide an analogue voltage.

What does

Serial.println (analogRead (hotProbepin));

Give you?

Does the value change when you put your finger on the sensor?

Work from there.

Start looking in the playground pages and googling and reading data sheets.

Rob Gray aka the GRAYnomad www.robgray.com

Go Up