Show Posts
Pages: [1] 2 3 ... 7
1  Using Arduino / Sensors / Re: How do I pause or stop infrared output from IR emitter? on: June 19, 2014, 09:37:04 pm
Code:
digitalWrite(PIN_STATUS, !digitalRead(PIN_DETECT));

This line will  write NOT level of PIN_DETECT to PIN_STATUS. In other words :

If PIN_DETECT == LOW write HIGHT to PIN STATUS , if PIN_DETECT == HIGH write LOW to PIN_STATUS .

Thank you.
So, set the LED to the opposite state that the receiver is in.
2  Using Arduino / Sensors / Re: How do I pause or stop infrared output from IR emitter? on: June 18, 2014, 08:27:18 pm
Quote
Code:
irsend.mark(10000);

Doesn't seem to allow the IR LED to shut off no matter how small a value I put in there besides zero. I am prolly goofing it up. Thank you, though.

Quote
Code:
digitalWrite(PIN_IR, LOW);
Does have the desired effect. Thanks for that. Very nice way of generically just getting it lit up and off like a regular LED.

I do not understand how the if statement at the line:
Code:
if (!digitalRead(PIN_DETECT)) {
is working.
To me it seems to be saying, "if there is no input detected".
What does that line really mean?
EDIT:
According to definition:
Quote
LOW
The meaning of LOW also has a different meaning depending on whether a pin is set to INPUT or OUTPUT. When a pin is configured as an INPUT with pinMode, and read with digitalRead, the microcontroller will report LOW if a voltage of 2 volts or less is present at the pin.
It seems possible that it is saying, "If not LOW" which is zero or close to zero volts. ??

Same confusion for the similar command:
Code:
digitalWrite(PIN_STATUS, !digitalRead(PIN_DETECT));

Turn on the regular LED light if nothing detected?
EDIT: I think I at least see this line is saying, "Change the pin status to match the true or false statement." So if theres an on or off, match it.
3  Using Arduino / Sensors / How do I pause or stop infrared output from IR emitter? on: June 17, 2014, 09:02:24 pm
I believe at the point in the code:
  irsend.mark(0);
turns on the IR emitter but I can't find what value turns it off.

Code:
#include <IRremote.h>
// Simple Infrared Light Output
// IR LED Transmitter/Signal Sender
#define PIN_IR 3
// IR Detector
#define PIN_DETECT 11
// LED For Success Indication
#define PIN_STATUS 12
// Set up sending functionality from library
IRsend irsend;
void setup()
{
  Serial.begin(9600);
  pinMode(PIN_DETECT, INPUT);
  pinMode(PIN_STATUS, OUTPUT);
  // Infrared Output Command
  irsend.enableIROut(38);
  // Output Infrared Light
  irsend.mark(0);
}

void loop() {
  // If there is light detected, light up led and send a message
  // to the serial monitor window
  if (!digitalRead(PIN_DETECT)) {
  // Tells LED to light up as long as infrared detector
  // sees an IR signal being sent
  digitalWrite(PIN_STATUS, !digitalRead(PIN_DETECT));
  Serial.println("IR Light Detected!");
  digitalWrite(PIN_STATUS, LOW);    // sets the LED off
  }
}

Thanks in advance.
4  Using Arduino / General Electronics / Re: Legs of components not long enough, what do you do? on: November 25, 2013, 10:34:20 pm
I think i've figured out what the problem is. It appears that when I clip the excess leads from the bottom of the board that it is breaking the copper contact traces.

5  Using Arduino / General Electronics / Re: Legs of components not long enough, what do you do? on: November 23, 2013, 02:53:52 pm
I began having problems with my projects(using breaduino) even when placing them back onto the breadboard as I was trying to figure out how to jumper the capacitors(for crystal clock) -due to the short leads.
Soldering wires and using jumpers for some reason causes the lcd to not initialize. - I would place the crystals in their own rows then jumper them to the crystal and ground.
Once I placed the two capacitors right next to the crystal(pins 9,10) and directly to ground(for my breaduino projects) the lcd would initialize again.
I am hoping that now when I solder this project onto a board I will be able to resolve that issue with the techniques discussed in this thread.

I sure would like to understand why the capacitors and crystal are so picky about placement with regard to each other.

posted by dc42
"The positioning of the 0.1uF cap between Vcc and Gnd is more important. Place it it directly between the Vcc and Gnd pins of the atmega328p, right over the top of that chip."

Should I add this to my breaduino? I didn't see any instructions on doing this in either of the two tutorials on how to make a breaduino.
6  Using Arduino / General Electronics / Re: Legs of components not long enough, what do you do? on: October 20, 2013, 09:42:48 am
Great! That'll work too. You get a Karma Point! =)
7  Using Arduino / General Electronics / Re: LED tutorial: "shorter anode pin should be connected to positive". Eh?! WTF? on: October 20, 2013, 09:40:26 am
Quote
The reliable indication is the flat or
notch on the plastic body which is always the cathode side. 

Not on the " reverse polarity" ones I bought from China Mark.  The flat and the short leg were on the anode.

I always check before assembling now, my old meter has a transistor tester and I just plug the LED into the C and E of the socket ( with the meter switched to npn )

If I want to check the approx forward voltage, I use the continuity test position.

Why is it marked C and E instead of C and A?
8  Using Arduino / General Electronics / Re: LED tutorial: "shorter anode pin should be connected to positive". Eh?! WTF? on: October 20, 2013, 09:36:34 am
So you measure it with the tester, and then as you go to plug it in you think "did I just rotate that 180ยบ before putting it in?".

So then get out your Sharpie and make a tick-mark high up on the K lead right away.
(Black, negative, K -- "Got It.")


What's K stand for? Common? (K)ommon
9  Using Arduino / General Electronics / Re: Breadboard Problems on: October 20, 2013, 09:25:53 am
Some very large breadboards have the + and - lines not connected at the halfway point.

Note the bridge wires at the halfway point. I have a couple of large breadboards like this:



Is it surprising that the manufacturer of breadboards with breaks in the rails don't supply some kind of indication to show that it is not continuous? Seems like such a nuisance to me. Why would they want to design it that way?
10  Using Arduino / General Electronics / Re: Legs of components not long enough, what do you do? on: October 20, 2013, 09:13:54 am
Oooh, so put a leg of two components in the same hole on the circuit board and/or attach holes via legs.

I love it, thanks for the tips/advice!
11  Using Arduino / General Electronics / Re: Legs of components not long enough, what do you do? on: October 19, 2013, 02:37:54 pm
That's valuable to know.
I can place the crystal close to the chip no problem.

How do I place a capacitor in a blank area of a breadboard and jumper to and from it while making it still effective? Or does it HAVE to be inline(directly in the row) with the component?
12  Using Arduino / General Electronics / Re: Legs of components not long enough, what do you do? on: October 19, 2013, 01:25:29 pm
If you are using a breadboard you plug the components into available points then use jumper links to connect to the desired locations.  This works OK for DC systems and low frequencies but if working at RF/VHF/UHF you need extra care due to capacitance and inductance introduced by the links.

One concern I am having with this is when I use capacitors.
For making the Breaduino it requires that a capacitor is connected from pin 9 and 10 to grounds via the capacitor. And then the 16mhz chip is supposed to be placed in between them at pin 9 and 10.
http://arduino.cc/en/Main/Standalone
So if I were to put the capacitors on a different part of the board and jumpered them from ground and then to the row of the pins. Would that still perform in the same way or would the crystal no longer be between the caps and the pins of the Arduino?

I guess if I understood why the crystal is supposed to be between, it would help.
13  Using Arduino / General Electronics / Re: Legs of components not long enough, what do you do? on: October 19, 2013, 01:09:48 pm
Ok, I'll keep trying. Do you use heatshrink or anything?
14  Using Arduino / General Electronics / Re: Legs of components not long enough, what do you do? on: October 19, 2013, 12:59:23 pm
When I transplant to the printed circuit board I get from RadioShack. There isn't enough holes in a row but there are single holes all over. How do I connect those singles to the rows? I see they have Bare Paint and I was thinking of using that to connect a hole to a row.
How do you go about solving that problem?
15  Using Arduino / General Electronics / Legs of components not long enough, what do you do? on: October 19, 2013, 12:32:32 pm
I have a couple of components that the ground leg won't make it to the connection point on my breadboards/circuit boards. The legs are just too short. What can you do when this happens? I soldered some wires onto the legs of a resistor, led, and a capacitor and now my project doesn't work.
What could be going wrong or how did you make your too short connections work?
Pages: [1] 2 3 ... 7