Loading...
  Show Posts
Pages: 1 ... 90 91 [92] 93 94 ... 147
1366  Using Arduino / Project Guidance / Re: Cycling LED's with a button (fixed) on: October 25, 2012, 04:17:22 pm
What was wrong with the last thread?
1367  Using Arduino / Programming Questions / Re: button error on: October 25, 2012, 04:15:33 pm

Did you try the link on that page for the version 1.0 library?
1368  Using Arduino / Project Guidance / Re: Creating a 2-digit 7-Segment Display for Temperature on: October 24, 2012, 04:00:18 pm
So if the pins used for the values are (3,4,5,6) and (7,8,9,10), what syntax would I use to assign those?
The C++/Arduino syntax.

You use the digitalWrite() function to set the pins as HIGH or LOW. You can use bitRead() function to extract the binary bits that need to be set for each of the pins.

Code:
int pinOne = 3;
  int pinTwo = 7;
 
  pinMode(pinOne, OUTPUT);
  pinMode(pinTwo, OUTPUT);
 
  int digitOne = temp / 10;
  int digitTwo = temp % 10;
 
  Serial.println(temp);
  Serial.println(digitOne);
  Serial.println(digitTwo);
 
  digitalWrite(pinOne, HIGH);
  digitalWrite(pinTwo, HIGH);
What is this supposed to do exactly? All this does is determine the digits, print them out to the Serial monitor and set pins 3 and 7 HIGH.
1369  Using Arduino / Project Guidance / Re: Creating a 2-digit 7-Segment Display for Temperature on: October 24, 2012, 03:40:14 pm
How do you go about finding the correct pin number?

By looking at what pin you plugged it into on the Arduino.
1370  Using Arduino / Project Guidance / Re: Creating a 2-digit 7-Segment Display for Temperature on: October 24, 2012, 03:22:34 pm
I am not sure what kind of resistors are driving the LEDs, but this is the datasheet (http://www.futurlec.com/74LS/74LS47.shtml).

So you need to connect 4 pins per segment to the Arduino and send the binary code to those four pins. The simple way to do it would be to use digitalWrite() individually. Another (better in my opinion) way would be to use port manipulation. But I don't see how you think that code can drive the LEDs when nowhere in that sketch do you specify what pins the decoders are hooked up to.
1371  Using Arduino / Project Guidance / Re: Creating a 2-digit 7-Segment Display for Temperature on: October 24, 2012, 02:40:49 pm
Code:
 pinMode(digitOne, OUTPUT);
  pinMode(digitTwo, OUTPUT);

}

I take it this is where you are trying to set the 7 segment LEDs? That's not what pinMode() is for. What are you using to drive the LEDs? Are those ICs shift registers? Link to the 7-Segment datasheet?
1372  Using Arduino / Programming Questions / Re: String 'object' or not? on: October 24, 2012, 09:45:17 am
This link seems like it should help:

http://www.cplusplus.com/reference/clibrary/cstring/
1373  Using Arduino / Project Guidance / Re: Cycling LEDs with a button on: October 24, 2012, 09:33:19 am
So you have code already that you're not going to post? Makes it pretty difficult to help...
1374  Using Arduino / Project Guidance / Re: help with - 2 digit 7 segment display and 2 74hc595 on: October 24, 2012, 09:27:13 am
*bump
Still waiting on that updated code...
1375  Using Arduino / Project Guidance / Re: line follow code on: October 23, 2012, 05:42:27 pm
i know that, im just confused about putting the if statements with the values and making it read the sensors properly

Well, what have you tried so far?
1376  Using Arduino / Project Guidance / Re: Desperate need of help on: October 23, 2012, 05:14:17 pm
555 Timer with very big Resistor and Capacitor.
1377  Using Arduino / Project Guidance / Re: Comparing data on: October 23, 2012, 04:00:28 pm
My issue is how do i pickup the specific data based on the cycle #. As for a test I could put different integers in, but not sure how to increment the int name. eg
int C1 = 22.34
int C2 = 18.45

If you need decimal places, you shouldn't be using ints.

Quote
so when the cycle count = 1 read C1 and compare
on the next loop read C2
but i can't put something like (c1 +cycle) = c2

Sounds like you need an array (and a more descriptive variable name).
1378  Using Arduino / Programming Questions / Re: blink in microseconds on: October 23, 2012, 03:34:05 pm
Hi.. I need to get six leds to blink without delay in microseconds

Easy way to do it:

http://www.arduino.cc/en/Reference/DelayMicroseconds

Better way to do it:

http://www.arduino.cc/en/Reference/Micros
1379  Using Arduino / Project Guidance / Re: help with - 2 digit 7 segment display and 2 74hc595 on: October 23, 2012, 01:19:14 pm
I just wanted some help with this beacause I can't wrap my head around it. Now it counts 0 1 2 3...9 00 11 22 33 44
And yet, no updated is code is posted.
1380  Using Arduino / Project Guidance / Re: Have a loop run for X amount of time on: October 23, 2012, 12:58:47 pm
The first block of code you quoted I was playing with my concept. I just wanted to see if that function worked. EndTime was set to 10 seconds, so as long as I pushed the first input before 10 seconds it would perform as hoped. I just need a way to replace millis() with a timer function starting at 0 seconds when the button is pushed.

The second piece of code I was tinkering with that concept. I wanted the FLED which was controlled by FSTATE to be Low while my timer was still going. Yes, that proves my lack of understanding at this point smiley-wink

For future reference, It's a good idea to remove "tinkering code" if it isn't part of your actual project. Otherwise, it is distracting and leads to wasted time when you're seeking help.
Pages: 1 ... 90 91 [92] 93 94 ... 147