Hot answers tagged

7 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 ...
John Burger's user avatar
  • 1,875
7 votes
Accepted

What is micro C in a circuit diagram?

It means "Micro Controller" - you know it as "Arduino".
Majenko's user avatar
  • 105k
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 ...
Edgar Bonet's user avatar
  • 42.8k
6 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) ...
Filip Franik's user avatar
  • 1,292
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 ...
BrettAM's user avatar
  • 4,431
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 ...
Edgar Bonet's user avatar
  • 42.8k
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= {...
ratchet freak's user avatar
5 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 ...
Jeff Wahaus's user avatar
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.
brhans's user avatar
  • 163
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 ...
st2000's user avatar
  • 7,315
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 ...
James Waldby - jwpat7's 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 ...
Majenko's user avatar
  • 105k
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 ...
chrisl's user avatar
  • 16.1k
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* ...
Rick's user avatar
  • 61
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 ...
st2000's user avatar
  • 7,315
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. ...
BartmanEH's user avatar
  • 230
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 ...
MalphasWats's user avatar
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(...
Mikael Patel's user avatar
  • 7,969
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 ...
DrJones's user avatar
  • 31
3 votes
Accepted

IR basic connection

From what you have described, i think you are getting confused between the function of the two types. The 3 leg style is designed to receive coded pulses from remote controls (TV,Video, etc) where as ...
Doug's user avatar
  • 196
3 votes

IR basic connection

To expand on Doug's answer: There are two types of IR receiver. The two-pin one you have is basically a photodiode with infra-red filter. When infra-red light hits it the transistor gets biased and ...
Majenko's user avatar
  • 105k
3 votes
Accepted

Sending IR via a wire

Your IR receiver is decoding the high frequency pulsed On-Off-Keying waveform for you. The Arduino doesn't do that. An IR signal consists of high frequency (say 36KHz) on-off light pulsed at a lower (...
Majenko's user avatar
  • 105k
3 votes

DC motor not start?

Based on this thread: https://forums.adafruit.com/viewtopic.php?f=31&t=27069 https://stackoverflow.com/questions/18705363/arduino-uno-pwm-pins-conflict http://forum.arduino.cc/index.php?topic=...
duck's user avatar
  • 1,258
3 votes

How do I write the codes in #define in an IR Receiver circuit?

Your problem is that you don't know how to form hexadecimal numbers. In your code (in future, if you have an error in the code please post the code that is causing the error, not something else ...
Majenko's user avatar
  • 105k
3 votes

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

I realize this is old but I have had a similar challenge making an code wheel for an optical encoder. PLA material did not block the infrared. however, all of the codewheels that I have made with ...
Mark's user avatar
  • 131
3 votes
Accepted

Whats wrong with my code?

The errors are self-explanatory. You just have to read them carefully. ‘B54A3AC5’ was not declared in this scope The compiler doesn't know what "B54A3AC5" means. Nor do I, but I gess you may mean ...
Edgar Bonet's user avatar
  • 42.8k
3 votes

Can I connect more than one IR receiver to an Arduino Uno?

That library only supports one IR receiver at a time. Try this fork that seems to have added multiple receivers support.
Gerben's user avatar
  • 11.3k
3 votes

Arduino Switching Between Loops IR Remote

delay(0) apparently[*] acts like delay(2^32) or about 10^10 milliseconds. That may not be what you had in mind ... :) Try reducing the delay to 1 or use delayMicroseconds() to get something shorter. ...
JRobert's user avatar
  • 15.2k
3 votes

how to use hx-53 (IR Transmitter Infrared Sensor Module) with ESP32?

The HX-53 look like a IR LED and a current limiting resistor on a small PCB. It also has a LED and a resistor in series for indication when the invisible IR diode is on or off. So you can change the ...
MatsK's user avatar
  • 1,356
3 votes
Accepted

Is an Ultrasonic Sensor or Infrared Sensor better for measuring distance (to/from a human body)?

That depends on your requirements. An IR distance sensor will work better with different materials, since IR light is mostly reflected in very broad angles (expect for very reflective materials, like ...
chrisl's user avatar
  • 16.1k

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