Show Posts
Pages: 1 ... 59 60 [61] 62 63 ... 197
901  Using Arduino / Programming Questions / Re: How do I convert a char to String? on: October 19, 2013, 07:09:28 pm
What kind of (s/S)tring?

"string"
char Str1[15];
char Str2[8] = {'a', 'r', 'd', 'u', 'i', 'n', 'o'};
char Str3[8] = {'a', 'r', 'd', 'u', 'i', 'n', 'o', '\0'};
char Str4[ ] = "arduino";
char Str5[8] = "arduino";
char Str6[15] = "arduino";

OR

String object


Quote
Also, is there any way to stop an Arduino until it receives input from a keypad?
Stop the Arduino how, an example would be helpful, but first, we need to see your code.
902  Using Arduino / Programming Questions / Re: Fastest way to read a de-bounced button? on: October 18, 2013, 05:44:32 pm
Why not just debounce the button with hardware(capacitor and resistor) instead of software? But if you want to do it with software, option A is the better way.
903  Development / Other Software Development / Re: New Password Library on: October 18, 2013, 05:41:22 pm
Any thoughts as to why this is happening?
There is always a snag.


I figured it out... kinda, I went back to my original version and just modified it but kept the char * arrays instead of using a structure. I still want to understand what the problem was, I'm still thinking it was memory leakage issues.
904  Development / Other Software Development / Re: New Password Library on: October 18, 2013, 01:22:45 pm
Funny you should say that, because after I posted this, I began to rewrite the library. I got rid of set user and set password and I'm trying to see if I can cut the code down by storing the passwords and usernames in a structure. It works great until I try to add a new password to the list. That's when I'm guessing the memory is leaking.

After much debugging I noticed that if I add four password in the sketch, it works fine. But once I manually enter a password, the password I entered always matches what was stored.

I did a print out of what I entered and got this. These are the four passwords I stored at compile time.
1234 (what I enter)    1234(what is stored)
5678.    5678. = user found
abcd.     abcd = user found
Asdf.     Asdf =user found

Now I add a new password 8520, It gets stored but now if I enter an actual wrong password it over writes 8520 and says that the password was found every time.

I really don't know how to solve this problem other than to just not have the user be able to store new passwords.
905  Development / Other Software Development / Re: New Password Library on: October 17, 2013, 03:31:45 am
I put it as an attachment
906  Development / Other Software Development / New Password Library on: October 16, 2013, 10:04:04 pm
Hi everyone, what I have here is new password library that supports multiple passwords and multiple users. I didn't really like the current password library mainly because it can only check one password  and it doesn't support any usernames. So I made a new one and after extensive testing, I think it should be shared.

Please note, I am still working on it to make it more code efficient, so I welcome any suggestions you may have. This is more of a rough draft version, because I am in the process of linking it with both LiquidCrystal (/ I2C) libraries and the current UTFT library.

So let me know what you think it.

UPDATE: Better version on last post.
907  Using Arduino / Programming Questions / Re: New Arduinist has question on: October 16, 2013, 04:39:10 pm
Lol, your welcome.
908  Using Arduino / Programming Questions / Re: New Arduinist has question on: October 16, 2013, 04:06:44 pm
A simple IF statement should suffice.

if(value > 0) Serial.print(" "); //prints a space before the value
Serial.println(value);              //"-value"
909  Using Arduino / Project Guidance / Re: how to set up raido control on: October 15, 2013, 10:51:05 pm
Quote
what i am trying to do is make it move forward when i push the joy stick forward for starters. what i have gotten so far is forward movement but not with joystick forward.

Ok, so if not with the joystick, how did you get "it" to move forward?
The example code you found, outputs data when a command is given, so what readings are you getting when you send the receiver a command? If you push the joystick forward and reverse, do you see any change in readings? Could you perhaps post what you are getting?
910  Using Arduino / Project Guidance / Re: Guidance to make my robot work on: October 14, 2013, 02:45:54 pm
What you could do is assign each button a number (1-4) and every time a button is pressed, it stores the number in an array. Now for this to work properly, you will need to use Case statements, so case 1 would be forward movement, case 2 is reverse movement, 3 is left, 4 is right. You may want a default case to stop the robot too.

Now when the fifth button is pressed, it will go through the sequence. You may want to set a fail safe limit, so if you press too many combinations, the code knows not to overflow the array, and to then start the sequence. Another thing make you also keep track of the number of combinations you enter, this way, you can use a simple FOR/WHILE loop to go through the sequence.
911  Using Arduino / Project Guidance / Re: Turning arduino into a gamepad for pc on: October 13, 2013, 01:49:30 pm
With an Arduino Leonardo acting as a keyboard, it is.
912  Using Arduino / Programming Questions / Re: How to write a local function in C++ on: October 13, 2013, 01:38:25 am
That's awesome, thanks Nick.
913  Using Arduino / Programming Questions / Re: Problems for my quad on: October 12, 2013, 03:58:26 am
Could it be because your using delays that block your code from doing anything else until they are done? Maybe look into the Blink Without Delay sketch, and learn how it works.
914  Using Arduino / Project Guidance / Re: Need some advice to build a drag racing tree on: October 12, 2013, 12:39:15 am
I think you forgot to bold this part too i also i'm not sure if i made things clear but we are racing 1/8th scale electric cars (rc)
915  Using Arduino / Audio / Re: Arduino library for WTV020-SD-16P audio module on: October 12, 2013, 12:34:59 am
RL, is that rotate left? I thought it was ROL or RCL (rotate left with carry)
Do you have a complete ASM cheat sheet?

Edited:
Never mind, RL is rotate accumulator left.
Pages: 1 ... 59 60 [61] 62 63 ... 197