Hello,
For chool I had to do Project with the Arduino MEGA 2560.
I`m useing the halleffect-sensor Honeywell ss41.
My plan is that, if one or more Sensor detect an Magnetic FIied an LED should light up.
With one sensor it works perfectly, but i dont know what i need to change about the Code if i whats to use more sensores (but all of them are the ss41 sensor).
my code at the moment is.
int hePIN = 12;
int ledPIN = 13;
int heState = 0;
void setup (){
pinMode (ledPIN, OUTPUT);
pinMode (hePIN, INPUT );
}
void loop(){
heState = digitalRead (hePIN);
if (heState == LOW){
digitalWrite (ledPIN,HIGH);
}
else {
digitalWrite (ledPIN,LOW);}}
so i would like tu include like 5 or more of the same sensor to this code..
I really hope someone can help me.
So thanks in advance..
(sry for no perfect english )