Hot answers tagged

7 votes

IR Receiver interrupt and arduino sleep mode

This is what I have managed to achieve ... Library IRLib - GitHub Version 1.51 March 2015 Copyright 2013-2015 by Chris Young http://tech.cyborg5.com/irlib/ This library is a major rewrite ...
user avatar
  • 35.3k
7 votes
Accepted

Blue LED not switching off

Every time through your loop, the LED is being set to HIGH voltage. This may or may not be followed by setting it to LOW voltage, but since the loop runs again immediately, it's immediately set back ...
user avatar
  • 463
7 votes
Accepted

What is micro C in a circuit diagram?

It means "Micro Controller" - you know it as "Arduino".
user avatar
  • 103k
6 votes
Accepted

Can I power two 5V with Arduino powered with 9V power adapter?

The voltage will be fine - as long as you plug it into the DC barrel jack, and don't try to wire directly to the 5V pins. The barrel jack has a voltage regulator on it that will convert 7-12V down to ...
user avatar
  • 1,805
6 votes

Locally declared variable takes up global variable space in dynamic memory/SRAM

Isn't the space taken up by the local variable supposed to be freed up from the SRAM once the functions runs because I have declared the variable locally? This is correct. The local arrays you ...
user avatar
  • 36.9k
5 votes
Accepted

bitClear doesn't work on most significant bit

uint32_t data = 0xFFFFFFFF; Serial.println(data, BIN); data = 0xFFFFFFFF; bitClear(data, 30); Serial.println(data, BIN); data = 0xFFFFFFFF; bitClear(data, 31); Serial.println(data, BIN); On my mega ...
user avatar
  • 4,309
5 votes

How to run 50 IR LEDs off an Arduino UNO?

You should put a current-limiting resistor in series with each LED. You could then try to drive all of those LEDs from a beefy transistor, like a power MOSFET or a Darlington. Alternatively, you can ...
user avatar
  • 36.9k
5 votes

Locally declared variable takes up global variable space in dynamic memory/SRAM

You must declare the array in global space or static, and make sure the function you pass the buffer pointer to knows it is in PROGMEM. void send22() { static unsigned int irSignal[] PROGMEM= {...
user avatar
5 votes
Accepted

Tone() conflicts with IRremote library (multiple definition of `__vector_7')

Exactly as @MichelKeijzers wrote the issue is caused by "IRremote" using same timer as "Tone" and the solution to this problem is a little dirty. Since Tone is included in ArduinoCore (and compiled) ...
user avatar
  • 1,262
4 votes
Accepted

Reliably duplicate custom IR remote control with ATTiny85

The exact duration of the pulses don't matter much. In your example, you see that in all three recorded samples that's about 14000 (about 9400); about 1200 (about 600); about 1200 (about 600) etc. ...
user avatar
  • 251
4 votes
Accepted

How to power IR LEDs with arduino?

Typically, rational control of an LED sets the amount of current that goes through the LED, rather than setting its voltage. You could add series resistors so that when the desired current is flowing ...
user avatar
4 votes
Accepted

How to send unmodulated IR-Signal via cable?

There are two major components to an infra-red signal. One is the high frequency carrier wave signal that pulses the LED on and off. This frequency has to match that of the receiver and is used with ...
user avatar
  • 103k
4 votes
Accepted

What's wrong with my IR sensor

See page 5 of your datasheet - that 'fancy' sensor suppresses "• Continuous signals at any frequency". So you'll need to pulse your 38.4kHz signal for the sensor to produce an output.
user avatar
  • 164
4 votes
Accepted

how to prevent IR signal to go through 3d printed plastic?

You can not use common modulation remote control receivers as they contain an ACG feature which will likely "turn up the volume" until it detects even a weak reflected signal. Instead consider if ...
user avatar
  • 6,616
4 votes
Accepted

Using a transistor to get 100mA on a IR led

Here is a diagram from Peter Bennett's answer to an Electronics Stackexchange question, How much voltage to give my IR LED?: As you can see, the current-limiting resistor is in series with the IR ...
user avatar
4 votes

Using a transistor to get 100mA on a IR led

Increasing the power to the LED isn't the best way of increasing the distance. In fact it's the worst way. The 100mA is only for a small duty cycle. You can power it with 100mA but only for a ...
user avatar
  • 103k
4 votes
Accepted

Why is Arduino resetting while driving motors?

The VIN pin goes to a 5V voltage regulator on the Arduino and needs at least about 7V minimum to work properly. If you want to supply 5V to an Arduino do it either on the 5V pin or via the USB ...
user avatar
4 votes

How does input from IR receiver to Arduino UNO board work?

You confuse the different technologies here. PWM is only an output, not an input. So every pin marked with the PWM symbol can OUTPUT a PWM signal. Reading a signal is a totally different task with ...
user avatar
  • 14k
4 votes
Accepted

Change data-type String

irsend.sendNEC(strtoul(irrequest.c_str(), NULL, 10)); did the trick with the help of Juraj. Much thanks! I only had the set 10 to 16 to get it to work. Working code: // Configuration const char* ...
user avatar
  • 61
3 votes

Using VS1838B with Arduino

Looking further here http://forum.arduino.cc/index.php/topic,188236.0.h... I found the following "Removing the files - libraries\RobotIRremote\IRremoteTools.cpp and libraries\RobotIRremote\...
user avatar
  • 143
3 votes

How to increase the detection distance on Arduino KY-032 obstacle Avoidance sensor?

The wizecode page has some nice info. However the R5 pot (near the EN jumper) does not change the duty cycle but directly the current to the IR LED - still affects the brightness though. Too much ...
user avatar
  • 31
3 votes

Tv remote connection to an Arduino

Using an IR library as mentioned in a previous answer is likely to be about the best approach. However, if you decide to use electronic switches to jumper across the remote's switch contacts, ...
user avatar
3 votes
Accepted

Tv remote connection to an Arduino

If you're just running lines to the buttons, you won't need to power the remote from the arduino. You could just let it keep the internal batteries. But it would be possible to wire it up for power ...
user avatar
  • 241
3 votes

IR receiver transmitter High frequency

While you are doing a delay() you can't be doing anything else - that includes looking to see if the beam has been broken by the ball. You must not use delay() in your sketch, instead use millis() as ...
user avatar
  • 103k
3 votes
Accepted

Controlling relays with IR and button

So according to your comments this should be the code if no mistake was made #include <IRremote.h> #define irPin 8 IRrecv irrecv(irPin); decode_results results; const int buttonPin = 2; const ...
user avatar
  • 926
3 votes
Accepted

Script stops functioning after calling irsend() function in irlibrary!

Apparently you should be calling irrecv.enableIRIn() after sending, not irrecv.resume(). Sorry for suggesting the wrong thing on IRC before :-)
user avatar
3 votes

What's wrong with my IR sensor

The answer I've accepted is the correct answer, but I wanted to add this extra bit for completeness. I reworked my code to use non-blocking delays for the IR LED so the sensor actually gets a chance ...
user avatar
3 votes

Nokia32/RCMM IR decoding issues

I'm unable to provide a complete answer yet but my research so far into a similar quest to use a similar remote can at least answer why you are getting two values for the same button on the remote. ...
user avatar
  • 230
3 votes

Send analog value over IR?

Yes, it is possible. That is already supported by the IR library. Please see this tutorial for further details. The outline of the sender is: uint16_t sample = analogRead(A0); irsend.sendSony(...
user avatar
  • 7,851
3 votes
Accepted

HUGE deviation in Sharp IR sensor values if other pins are defined in void setup()

Not sure why commenting out those two lines makes a difference. I think we need to see a schematic to resolve this. However... You do not use "pinMode" to setup an analog input! Look at the ...
user avatar
  • 6,616

Only top scored, non community-wiki answers of a minimum length are eligible