Show Posts
Pages: 1 ... 48 49 [50] 51 52 ... 86
736  Using Arduino / Displays / Re: counter with 7 segment LED serial display on: February 07, 2013, 05:36:07 am
Yes. You need to connect the power pins at least - how do you expect it to work otherwise.

The other pins depend on the device. If you look on the IC you will see a number (like 74HC595 or something) that will tell you the device type. If you then google that with arduino you will probably find example code.

737  Using Arduino / Sensors / Re: Temperature sensor LM335 on: February 07, 2013, 05:30:18 am
I have a library with example code at the link in my signature block.  Generally you would need to read the datasheet for the sensor as all the info is there.
738  Using Arduino / Project Guidance / Re: MIDI Controller Help for Senior Project on: February 07, 2013, 05:27:16 am
No idea on this one.  Why not just set one up and see how it goes?
739  Using Arduino / Programming Questions / Re: Real Time Clock module to display time and date on LCD on: February 06, 2013, 02:14:19 pm
Have you looked at my library as suggested above for sample code and a working example?
740  Using Arduino / Programming Questions / Re: Compare Dates - Times on: February 06, 2013, 05:12:58 am
%02d puts the leading zero in for you.  What you need to do is make sure the time is in 24 hour format so that 1 am is 01 and 1 pm is 13. The string will always be the same length.
741  Using Arduino / Programming Questions / Re: Compare Dates - Times on: February 06, 2013, 04:31:57 am
If in your case equal is correct then implement it the way you think it should be.
742  Using Arduino / Programming Questions / Re: Compare Dates - Times on: February 06, 2013, 03:56:08 am
Strcmp() returns different values depending on whether the strings are equal, greater than or less than.
743  Using Arduino / Programming Questions / Re: Serial Method/Function To Wait/Read Multiple Character Input? on: February 06, 2013, 03:54:32 am
The serial port receives a series of bytes that are interpreted by your code. The bytes have no inherent meaning - you give it the meaning.  The byte you are receiving in your example are being interpreted as chars, in other words ASCII codes. The byte gives you a number between 0 and 255. If you send two bytes one could be the low and the other the high byte of a 16 bit value or in fact they may be 2 ASCII characters.

If you enter data into the serial monitor then this will be sent as ASCII chars. However, between devices there is no restriction on what the bits transmitted mean. All you need to do is agree at both end on the protocol that will be used to send, receive and interpret the data.
744  Using Arduino / Programming Questions / Re: Compare Dates - Times on: February 06, 2013, 03:43:53 am
One other thing I forgot to mention is that you should be careful not to just check if they are equal but check if the current time is >= the set time, because being just one second out will void the equality condition.
745  Using Arduino / Programming Questions / Re: Compare Dates - Times on: February 06, 2013, 02:17:57 am
Quote
what is this "%04d%02d%02d%02d%02d%02d"?
You could look up the reference for sprintf()? It means 4 decimal digits with leading zero.

Quote
so I need to do some "string compare"
Try the function strcmp(). You should probably look up a C reference guide for string handling functions and get familiar with all the functions that are available. These are standard C functions that have existed for at least 30 years smiley-wink

Quote
and if for example in that time the cpu was doing something else
Like what? The cpu only does one thing at a time, so unless you are making it do soimething else it probably will not be.

Quote
make sense for you ?
Not really.

If you are looking to match a date and time and are trying to get it to the last second, then this is probably not the right way to go about it. Think about the problem. How far ahead are you planning to schedule events - years or seconds? Then decide the time resolution that you need. For example if you are only looking to trigger on the time, then why bother looking at the year, month or date?
746  Using Arduino / LEDs and Multiplexing / Re: Need Help 4-bit Binary Counter With Parallel Load on: February 05, 2013, 09:14:02 pm
Maybe it is me, but I have no idea what you are talking about.

Can you post your circuit and any code you may have so we can see what you are trying to do. I have a feeling that you are overcomplicating something here.
747  Using Arduino / Programming Questions / Re: Using my own library on: February 05, 2013, 09:10:17 pm
Have you tried calling it something different? It is probably safer in the long run as it will be clear when you come back to this project that you were not using the original library.
748  Using Arduino / Project Guidance / Re: MIDI Controller Help for Senior Project on: February 05, 2013, 09:07:53 pm
There is an audio section in the forums that has an active community for this sort of stuff. You may want to ask the moderator to move this posting there?
749  Using Arduino / Project Guidance / Re: Demonstrating wave forms (elementary school project) on: February 05, 2013, 09:04:54 pm
An easier option may be to find an app or some software that will demonstrate this on the computer?

I have an app called Electronic TB for iPad/iPhone that includes a wave generator that 'plays' the sound of the wave at a specific frequency.
750  Using Arduino / Programming Questions / Re: Compare Dates - Times on: February 05, 2013, 06:54:36 pm
Code:
char s[15];
sprintf(s, "%04d%02d%02d%02d%02d%02d", year, month, day, hour, minute, second);
Pages: 1 ... 48 49 [50] 51 52 ... 86