Show Posts
Pages: 1 ... 347 348 [349] 350 351 ... 511
5221  Using Arduino / Programming Questions / Re: Split string or send different data to each DC motor via serial on: July 18, 2011, 01:39:03 am
I typically suggest sscanf to get numbers from strings. Just Google sscanf.
5222  Using Arduino / Programming Questions / Re: Functions in separate tab - Help? on: July 17, 2011, 05:37:33 pm
http://liudr.wordpress.com/2011/02/16/using-tabs-in-arduino-ide/
5223  Community / Bar Sport / Re: If you could have 1 logged sensor on an Arduino in a space voyage... on: July 17, 2011, 05:18:56 pm
If enough space allowed, big tank of heavy water to detect neutrino for science. If not enough space, active human detector, hooked to self-destruction system that counts from 30 to 0 and blows the ship up if it fails to detect active human brain waves (my dead man's switch in case of alien infiltration of some sort that could mind-control humans and turn them into drones that lead the aliens to Earth).  smiley-twist Kaboom!
5224  Using Arduino / Displays / Re: LCD - Pin assignments on: July 17, 2011, 05:07:03 pm

Can you think of any reason why the tutorial avoided D6 & D7 and instead jumped to D11 & D12?
I have just changed the Pin assignment to D6 & D7, swopped the physical connections to D6 & D7 and the display remained blank??
I didn't write it so no I can't answer that.

I don't know why. There is no pictures or codes. Either or both could have been wrong and the display didn't work as a result. You re-did the tutorial and it worked so must mean you did it wrong with D6 and D7 but again no pictures so who knows what you did wrong. Just stick to the working tutorial. That is the best way to avoid problems.
5225  Using Arduino / Project Guidance / Re: need guide on Arduino LCD&KeyPad Shield (SKU: DFR0009) on: July 17, 2011, 12:44:13 pm
Very nice! Have you been able to do this without your arduino setup?
5226  Using Arduino / Displays / Re: LCD - Pin assignments on: July 17, 2011, 12:23:03 pm
Because pins 0 and 1 are hardware serial that you may need if you ever want to update the code via arduino bootloader. If you don't plan to update, go right ahead.
5227  Using Arduino / Displays / Re: I2C Slave with LCD Display and Keyboard on: July 17, 2011, 12:19:37 pm
So basically the panel runs a menu interface and tells arduino that which item is selected, is that right?
5228  Using Arduino / Project Guidance / Re: need guide on Arduino LCD&KeyPad Shield (SKU: DFR0009) on: July 17, 2011, 01:38:59 am
You need more complex mechanism to get what you want:

If you have 7900 and you press up on the 9 digit, then your number is added with 100, so 8000. I would rather have 7000 since your goal is to change one digit at a time, possibly without affecting the other digits. That was the up key and down key has the same issue. To solve the problem with a lot of math, do this:
(for 100s upkey)
number = number - ((number%1000 )/100*100 + (((number%1000 )/100+1)%10)*100;

Otherwise, track each digit with a different variable.
5229  Using Arduino / Project Guidance / Re: need guide on Arduino LCD&KeyPad Shield (SKU: DFR0009) on: July 17, 2011, 01:12:35 am
guys,

i wanna make the lcd light off all the time. only turn on the light when any button press.

so where and how should i do the code?

This is easy to answer, you can't. The back light is hardwired to 5V probably with a proper resister. To turn on and off the back light, you need a transistor and modify the circuit board. I'd rather focus on the code if I were you.
5230  Using Arduino / Displays / Re: I2C Slave with LCD Display and Keyboard on: July 17, 2011, 01:03:09 am
Nice work! I am working on something similar except it runs on serial. I thought about I2C or SPI interface a friend suggested me but ended up with just serial so the atmega328 onboard can act as masters and access EEPROM, RTC, or SD cards. Did you implement carriage return and line wrap etc?
5231  Using Arduino / Programming Questions / Re: LCD and keypad programming on: July 17, 2011, 01:00:38 am
You can start by telling us what hardware you use, what display and what kind of keypad. Provide links to where you bought them. Then we can look at your code and see if your code is doing what you want.
5232  Using Arduino / Programming Questions / Re: Fill whole array with the same value on: July 16, 2011, 11:52:00 am
I see, just

rep movsd;//do it!

Maybe not starting from 1 cell and starting from say filling 4 cells to minimize time. If you start from 1 cell and copy to the next, then copy 2 to 4 cells, you may save some time just loop-fill 4 cells, depending on how fast the block move runs compared with single cell. Auto address register increment should save time once you move enough stuff at a time cause there's overhead for a block move such as setting up registers to contain source and dest address and counter.
5233  Using Arduino / Programming Questions / Re: LCD and keypad programming on: July 16, 2011, 11:46:03 am

the problem is..how to display it on LCD with only 3 digit maximum..
and the maximum value is 100, more than that will give error message..
can some help me..Thanks in advance..


What is "it"? Is it a number? Is it float? What do you mean by 3 digit? Like 3.14? Or 123? Or 12.3?
What do you mean more than 100 gets error message, from where?

Do you have any code?
5234  Using Arduino / Programming Questions / Re: Serial Echo on: July 15, 2011, 05:23:11 pm
I don't see a default in Print.cpp... but adding argument '3' fixes it!

Now any way of using a DP? so I can type in 45.422 and have it print that, too? I was thinking of storing where the DP was and then dividing by a power of 10...

OK so you want fixed number of digits AFTER decimal but arbitrary number of digits before decimal? What is your exact requirement?!
5235  Using Arduino / Programming Questions / Re: Serial.print Problems on: July 15, 2011, 04:00:16 pm
Important C programming lesson:
Most programming languages allow you to shoot yourself in the foot.
C hands you the loaded gun.

C++ would "prevent" you from doing some stupid things but you can still define a gun class and a foot class and call my_gun.shoot(new foot(left)); smiley-wink

Either the sender or the receiver could have messed up the string. Without the code, I can only suggest you to isolate the two, say use a known program to test the string received to make sure the receiving end of your code is not messing up the string.
Pages: 1 ... 347 348 [349] 350 351 ... 511