Can you help me fix my code for my IR detection/emitting/project

94 views Asked by At

Context: Hello wonderful people of stack overflow, I am currently very lost with my arduino project. In short, I have a school project and I'm trying to make an arduino uno powered glove that essentially using a screen and software ill be able to select custom presets of devices I can control using specific gestures i do with my glove. For example, i select on my screen tv mode and it'll set the glove to tv mode where for example with I pinch my finger I can turn on the tv, pinch my ring finger and it'll switch channels, etc.

THE PROBLEM: i have a problem with my code. I keep getting the FFFFFFFF code and I want it to be more specific, do you know how to do that?

my code:

#include <IRremote.h>

int RECV_PIN = 11;
IRrecv Irrecv(RECV_PIN);
decode_results results;

void setup() {
  Serial.begin(9600);
  IrReceiver.enableIRIn();
}

void loop() {
  if (IrReceiver.decode(&results)) {
    Serial.println(results.value, HEX);
    IrReceiver.resume();
  }
  delay(100);
}

Materials List: Glove Components:

Flex Sensors (5 x $7.00) - $59.75

IR Components:

IR Transmitter - $0.30

IR Receiver - $1.00

Arduino Uno- $23.00

Other Components:

Transistor (BC547) - $0.20

Jumper Wires - $8.29

Power Supply:

Batteries and Connectors - $28.97

Miscellaneous:

Resistors and breadboard - $20.00

0

There are 0 answers