Show Posts
Pages: 1 ... 41 42 [43] 44 45 ... 80
631  Using Arduino / LEDs and Multiplexing / Re: LED-fade without delay on: February 18, 2013, 02:51:01 am
Look at my Multi-Blink sketch at the web site in my signature footer below.
632  Using Arduino / Programming Questions / Re: KEYWORDS.TXT on: February 17, 2013, 04:53:21 pm
You ask a good question and here is what I have been able to glean from examples I have seen.

Code:
#######################################
# Syntax Coloring Map
#######################################

#######################################
# Datatypes (KEYWORD1)
#######################################

MD_AButton KEYWORD1

#######################################
# Methods and Functions (KEYWORD2)
#######################################
setKeyId KEYWORD2
setDetectTime KEYWORD2
setRepeatTime KEYWORD2
getKey KEYWORD2

######################################
# Constants (LITERAL1)
#######################################
KEY_NONE LITERAL1

KEYWORD1 is generally used for the classes that you define in your library.
KEYWORD2 is used for the public member functions of the class. Basically these are the class' methods.
LITERAL1 is used for any #defines that are relevant for the user of the library.

I am sure there is more ...

If anyone knows where the reference for the content of this file is located, it would be good to share smiley.

Update:
Quick search on Google landed this article that did not exist last time I looked
http://acsweb.ucsd.edu/~sbliven/2012/01/arduino-ide-keywords/
633  Using Arduino / LEDs and Multiplexing / Re: Using more shields on a Arduino Uno??? on: February 14, 2013, 06:56:15 am
I would have thought the LCD shield would have to be on top to be able to read the output. I guess another consideration is what pins are being used by each shield and making sure that they are distinct. The rest depends on you and what you want to achieve. If you can stack them then it is cheaper than buying a mux shield.
634  Using Arduino / LEDs and Multiplexing / Re: Dual 7 segment counters with triggers for adding & subtracting from 00 to 99 on: February 14, 2013, 01:00:01 am
At the site in my signature block below there is code for a timer display that allows you to preset the value and then it counts down. You  may be able to use some of the code for our own purposes.
635  Using Arduino / Displays / Re: How to print chinese char on LCD 16x2 Display? on: February 10, 2013, 07:09:51 am
The character set I stored in the LCD ROM. You need to check what it contains either by looking up the number for the rom or by printing all the chars from 1 to 255. In my rom the top 127 chars contain Japanese chars.

Personally I think it is hard to see how all the Chinese chars would be available.

If you only need 8 or less you may be able to use the user defined characters.
636  Using Arduino / Sensors / Re: TCS230 clarified. Hardware Modified, code strengthened, hair lost. on: February 08, 2013, 07:46:29 pm
Thanks for this post, certainly saved me the pain of the GND/OE connection.
637  Using Arduino / Programming Questions / Re: Basic Coding question on variables on: February 08, 2013, 03:16:37 pm
For readability the second is better as you can group all these constants together at the top of the sketch.  Even better is to call them const if they will never change.

Because the led variable has a global scope it will persist and you can change it from anywhere. However, in your first case it does not have a value until setup is called. In the second case the compiler initialises the memory location so it has that value when the program starts running. In the arduino this makes no difference because setup is called first. On other systems it might.
638  Using Arduino / Programming Questions / Re: Checksum error on: February 08, 2013, 06:13:46 am
... And there is no way that a byte quantity can have 3 digits.

Are you sure that you are printing the value in hex all the time? Can't see mdb_dump anywhere.

Helpful debug would also be to print the value it should be when the test fails. That may give you a clue.

Checksums may not include every character received, for example the start of a packet, so are you sure you are using the right data?
639  Using Arduino / Programming Questions / Re: Checksum error on: February 08, 2013, 04:15:10 am
An array of size 30 has indices 0 to 29, so you probably mean 29 if you intend the last character.
640  Using Arduino / Programming Questions / Re: Can't unpload to Mini Pro on: February 08, 2013, 03:05:19 am
The basic issue is that there is no automatic reset of the Mini Pro when the serial line becomes active.

Here is the process that I use:
1. Start the compile/download cycle
2. At some point the 'Rx' LED on the MiniPro will flash.
3. Press the reset button when this happens.
4. The bootloader will take over on reset and allow the download to be executed.

It can be a bit tricky, but like most of these things the timing will comm with practice smiley

An alternative is to modify the Pro Mini woith a capacitor (from memory) that reset the serial line. You can search for this using google.
 
641  Using Arduino / Sensors / Re: Temperature sensor LM335 on: February 07, 2013, 05:58:38 am
Follow the link at the bottom of my post.
Look for the library int the downloads section.
Read the code to understand or just use it.
642  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.

643  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.
644  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?
645  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?
Pages: 1 ... 41 42 [43] 44 45 ... 80