Show Posts
Pages: 1 ... 41 42 [43] 44 45 ... 80
631  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.
632  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.
633  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.
634  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?
635  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.
636  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.
637  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.
638  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.

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