I'm trying to connect an IR and smoke sensor to my portenta h7 but for some reason my arduino is not detecting the sensors, I connected a breadboard to the sensors and some LEDs to see if im getting some kind of input but it seems im not getting anything this is my code for my ir sensor,
fireLED is pin D7 in the portenta for my LED and flame is the input pin D6 in the portenta.
const int fireLED = 7;
const int flame = 6;
int fire = HIGH;
void setup()
{
pinMode(flame,INPUT);
pinMode(fireLED,OUTPUT);
Serial.begin(9600);
}
void loop()
{
fire = digitalRead(flame);
if (fire == LOW)
{
digitalWrite(7,HIGH);
}
else
{
digitalWrite(7,LOW);
}
}
maybe the pin names are different for portentas but i dont know or maybe im missing some libraries
Hi @5mgod
Pls read the following post
It would very helpful for all of us to solve your query.
Kindly read it and reedit your post
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.