Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Re: How do you make pretty arduino schematics? on: November 30, 2012, 02:05:07 am
Thanks, Michael.  I've heard Eagle's learning curve is harsh, so I'll try fritzing instead.  I can add labels in after the fact with photoshop or whatever's handy.
2  Using Arduino / Project Guidance / How do you make pretty arduino schematics? on: November 30, 2012, 01:13:45 am
I keep seeing nice, clean, clear arduino schematics, like this one:  http://images.bit-tech.net/content_images/2010/09/arduino-projects-getting-started/arduino-morse-flasher-board-layout-large.jpg

Now I need to make a schematic for a recent project.  Somebody please tell me that making these things is easy, free, and fun. smiley-grin
3  Using Arduino / Networking, Protocols, and Devices / Re: How to easily send data from one arduino to another? on: November 25, 2012, 04:47:41 pm
Yay!  It works!  See this awful pile of lego and electronics in all its now-functioning glory here: 

Thanks again for the help, guys.
4  Using Arduino / Networking, Protocols, and Devices / Re: How to easily send data from one arduino to another? on: November 25, 2012, 04:04:26 pm
Bilroy:  Ohhhhhhh...yeah, that um...makes some sense.  I'll try that first.

Nick, I'll try your suggestion next and get back to both of you asap.
5  Using Arduino / Networking, Protocols, and Devices / Re: How to easily send data from one arduino to another? on: November 25, 2012, 03:32:47 pm
What do you mean the grounds of the two arduinos connected?  You mean the digital grounds?  How would that help?  Am I indeed missing something really important here?  smiley-eek-blue

EDIT: Nick:  you mean I should code in an edge-triggered event instead?  How would I do that in Arduino C?  I've done it in Verilog, but there was specialized syntax for creating such circuits in that case.
6  Using Arduino / Networking, Protocols, and Devices / Re: How to easily send data from one arduino to another? on: November 24, 2012, 08:18:07 pm
Ok, the analog reads are to detect the photocells' information. They seem to be working fine.  Neither buzzer is going off when the sensor on A is triggered, but what should happen is that A's buzzer should go off and B should report the total count.  If the count starts off at 2, and A's sensor is triggered, then you should get:
*beep* (from B)
*beep-beep-beep* (from A)

instead, like I said, starting off at zero, A never makes a sound and B just starts counting up at every available cycle. Did I mention the really weird thing is that this happens even when only a wire is connected to pin 7 of B and that wire is connected to nothing at all?  Seriously.  B goes off when its sensor is triggered AND it'll continue counting up as long as something is inside pin 7.  smiley-sad
7  Using Arduino / Networking, Protocols, and Devices / Re: How to easily send data from one arduino to another? on: November 24, 2012, 07:07:20 pm
Ok, so...I've tried changing the output pin to #3 and that hasn't changed anything, although I AM noticing some weird stuff.  Whenever a wire is connected to the #3 output pin, the buzzer (pin 13) stops working, even when the sensor is tripped.  I can see it's being tripped because the little "L" LED on the board goes off whenever I block the sensor.

EDIT: btw, this kind of communication normally works, right?  I'm not trying to do anything weird or problematic that people normally avoid?
8  Using Arduino / Networking, Protocols, and Devices / Re: How to easily send data from one arduino to another? on: November 24, 2012, 07:00:59 pm
Thanks, Nick.  Trying that presently.  And yeah, I'm normally big on meaningful variable names, but when you're changing things constantly just trying to get something to work, such nicieties tend to go out the window. Not good form, I know, but it happens.

brb with the results of that pin-change suggestion.
9  Using Arduino / Networking, Protocols, and Devices / How to easily send data from one arduino to another? on: November 24, 2012, 06:50:54 pm
I have two arduinos operating in tandem.  each with its own photocell and a buzzer to enunciate when a laser beam is broken.  I can't get them to communicate.  I just need the first device (call it "A") to tell the second device ("B") when its sensor is tripped.  B then keeps track of when either device's sensor is tripped, keeps count, and reads off its count every time each sensor is triggered.  

I can't get device A to tell device B what's going on properly.  I thought I could simply do that with a simple if-statement and setting an output pin on "A" to HIGH for B to read as part of its loop.  For some reason, though, the signal from A *always* comes in as high, not just when an event is triggered, so the count goes up continuously.  Are digital pins set to HIGH by default or something?  Any idea what's going on?  I really don't want to have to use a much more sophisticated form of communication for this kind of job.

here's my code from device A:
>>>>
Code:
int lightPin = 0;  //define a pin for Photo resistor
int threshold = 850;

void setup(){
    Serial.begin(9600);  //Begin serial communcation
    pinMode(13, OUTPUT);
    pinMode(1, OUTPUT);
}

void loop(){

  if(analogRead(lightPin) < threshold) {  
      digitalWrite(13, HIGH);
      digitalWrite(1, HIGH);
      
  }else{
      digitalWrite(13, LOW);
      digitalWrite(1, LOW);
  }
}
>>>
And here it is from device B:
>>>>
Code:
int lightPin = 0;  //define a pin for Photo resistor
int count = 0;
int threshold = 700;
int i = count;

void setup(){
    Serial.begin(9600);
    pinMode(13, OUTPUT);
    pinMode(7, INPUT);
}

void loop(){

  // If the local sensor is triggered, increment the count, hit the buzzer on pin 13, then report the new score
  if((analogRead(lightPin) < threshold)) {    
    digitalWrite(13, HIGH);
    delay(500);
    digitalWrite(13, LOW);
    count++;
    i = count;
    report_score();
  }
  
  // If an input comes in from the other sensor, increment count and report the new score
  if((digitalRead(7) == HIGH)) {
   count++;
   i = count;
   report_score();
  }
  
  digitalWrite(13, LOW); // Make sure the local buzzer is low at the end of each loop.
  
}
void report_score() {
  while(i != -1) {
    digitalWrite(13, HIGH);
    delay(100);
    digitalWrite(13, LOW);
    delay(100);
    i--;
  }
    delay(1500);
  }
10  Using Arduino / LEDs and Multiplexing / Re: How to drive dozens of LEDs from an UNO R3 for a Christmas project on: November 13, 2012, 02:41:02 am
I did a very quick and dirty layout on paper of what I'd need, and it's:

10 LEDs (yellow) - Star
13 LEDs (green) - Tree
9 LEDs (blue/red) - Lights on the tree
...and maybe a dozen more if I've got the resources to make a couple of presents under the tree.

32 LEDs off of, what?  13 or 14 outputs doesn't look good enough.  If I used the breakout board, though, that would take care of the tree circuit, and the rest would have to be powered in 1's and 2's by individual outputs.  Does that sound like a feasible plan?  It seems a bit awkward but for now I'm willing to take something that's possible and work on making it efficient later.
11  Using Arduino / LEDs and Multiplexing / Re: Two-photocell project off one arduino? on: November 13, 2012, 02:30:53 am
I can post my code, but I don't know how to easily create a simple circuit diagram for arduino projects.
12  Using Arduino / LEDs and Multiplexing / Re: How to drive dozens of LEDs from an UNO R3 for a Christmas project on: November 12, 2012, 09:17:24 pm
I just need to run 3 strings of LEDs.
13  Using Arduino / LEDs and Multiplexing / Re: How to drive dozens of LEDs from an UNO R3 for a Christmas project on: November 12, 2012, 06:10:42 pm
Ohhhhhhh...that's really cool.  So the way it must work is that you have the ability to power x LEDs at a time from your output, and as such set up an array Y elements long with x LEDs each, then you provide current to each element in the array in turn for...how long?

I guess the code for that wouldn't be too bad at all.  One output of the MUX is always on and the other alternates between...well...HIGH and LOW I guess...?  Is there an example circuit out there you can link me too?
14  Using Arduino / LEDs and Multiplexing / Two-photocell project off one arduino? on: November 12, 2012, 05:34:23 pm
Is it possible to run this project: http://www.electrojoystick.com/tutorial/?page_id=15

...but with two photocells and two LEDs?  Off the same Arduino?  I can get one such circuit to work off the same arduino but when I try putting two in tandem I get inconsistent results and nothing seems to work properly.  I'm wondering if perhaps having both photocells drawing power from the same analog 5v source is creating issues of an inconsistent circuit?  I don't mind getting a second arduino to make this project happen if I have to, but I'd like to avoid further expenditure if possible.

What's your opinion?
15  Using Arduino / LEDs and Multiplexing / Re: How to drive dozens of LEDs from an UNO R3 for a Christmas project on: November 12, 2012, 05:26:22 pm
I understand the theory of multiplexing and how it can communicate one source of data rather than the other, but how will this somehow introduce more power into my circuit?  I simply can't attach a bunch of LEDs to a bus run by an arduino output--there won't be enough power to light them all up.  Are you saying I should instead control a higher source of power (like a 9v battery?), turning it on and off using the 5v data signal from my arduino?
Pages: [1] 2