Skip to main content
deleted 28 characters in body
Source Link
dda
  • 1.6k
  • 1
  • 12
  • 18

I am trying to control an Arduino Leonardo R3 to run some code when "triggered" from a Raspberry Pi, this. This would be in a loop so that it can be ranrun multiple times. I have setupset up the Raspberry Pi and tested it with an LED and the output is working fine.

I then connected this up to the Arduino and checked for a HIGH input from the RPi using an if statement.

void setup()
  {
  pinMode(7,INPUT);
  
    
  if(digitalRead(7)==HIGH)
  {
    // CODE IN HERE
  }
}

I found that this did not work as the if statement was always true because of pull uppullup resistors not being used. I would greatly appreciate some guidance on this.

I am trying to control an Arduino Leonardo R3 to run some code when "triggered" from a Raspberry Pi, this would be in a loop so that it can be ran multiple times. I have setup the Raspberry Pi and tested it with an LED and the output is working fine.

I then connected this up to the Arduino and checked for a HIGH input from the RPi using an if statement.

void setup()
 {
  pinMode(7,INPUT);
  
    
  if(digitalRead(7)==HIGH)
  {
  CODE IN HERE
  }
}

I found that this did not work as the if statement was always true because of pull up resistors not being used. I would greatly appreciate some guidance on this.

I am trying to control an Arduino Leonardo R3 to run some code when "triggered" from a Raspberry Pi. This would be in a loop so that it can be run multiple times. I have set up the Raspberry Pi and tested it with an LED and the output is working fine.

I then connected this to the Arduino and checked for a HIGH input from the RPi using an if statement.

void setup() {
  pinMode(7,INPUT);
  if(digitalRead(7)==HIGH) {
    // CODE IN HERE
  }
}

I found that this did not work as the if statement was always true because of pullup resistors not being used. I would greatly appreciate some guidance on this.

Post Merged (destination) from arduino.stackexchange.com/questions/6635/…
Source Link

Controlling Arduino from Raspberry Pi

I am trying to control an Arduino Leonardo R3 to run some code when "triggered" from a Raspberry Pi, this would be in a loop so that it can be ran multiple times. I have setup the Raspberry Pi and tested it with an LED and the output is working fine.

I then connected this up to the Arduino and checked for a HIGH input from the RPi using an if statement.

void setup()
{
  pinMode(7,INPUT);
  
    
  if(digitalRead(7)==HIGH)
  {
  CODE IN HERE
  }
}

I found that this did not work as the if statement was always true because of pull up resistors not being used. I would greatly appreciate some guidance on this.