Show Posts
Pages: [1] 2 3 ... 273
1  Using Arduino / Programming Questions / Re: PYTHON IDE FOR ARDUINO on: Today at 11:05:56 am
Do you want an IDE/Compiler written in Python or one that allows you to develop Python code ?

Either way you are out of luck I would think.
2  Using Arduino / Programming Questions / Re: How to find number of "rows" in an array of strings? on: Today at 09:46:48 am
No problem, but I am still intrigued by the dynamic creation of the strings/Strings and not knowing how many there are.  Either the array will need to be declared large enough to hold the maximum number of strings to be created, in which case the sizeof() trick will not work, or declared just big enough to hold the strings in which case you will know how many of them there are.
3  Using Arduino / Project Guidance / Re: #28015 ultrasonic rang finder on: Today at 09:38:57 am
Oh you are a tease sometimes !
Other values ?????
4  Using Arduino / Project Guidance / Re: Button Debounce on: Today at 09:08:43 am
Please explain what you mean when you say that it is not working.  How is the button wired ?

I do wish that people would use consistent data types in programs even when some are interchangeable.  The bounce() function returns a boolean and you then test to see whether what is returned is HIGH.  It would be easier to say
Code:
if (bounce())
to test whether the value returned is true.  Changing the name of the function to say pressed() would make the program easier to understand too.
5  Using Arduino / Project Guidance / Re: Controlling car systems with arduino on: Today at 08:57:33 am
I was not being tough, merely ironic and pointing out the error at the same time, but I do wish that you had not revised the original post as it makes comments to it meaningless.  Adding a note to it would have been better.

One thing that I was deadly serious about though was the advice not to try implementing cruise control.
6  Using Arduino / Programming Questions / Re: How to find number of "rows" in an array of strings? on: Today at 08:51:15 am
This thread would have been over quicker if reply #5 had been noted, but I agree that econjack has provided chapter and verse.

What I don't understand is that if the strings (or Strings) are being created dynamically then you will surely know how many of them there are as part of the process of creating them.
7  Using Arduino / Project Guidance / Re: Controlling car systems with arduino on: Today at 06:22:03 am
Quote
I understand the usual for boards is 40amp / pin or 200 amp total
WOW !
Where can I buy an Arduino that can supply 40 Amps from a pin ?

I guess we all know what you mean, but seeing what you wrote worries me that there is a certain lack of clear thinking, and if your programming is as sloppy as your understanding of current then you will have difficulties for sure.

Whatever you do please do not attempt to create an Arduino powered cruise control on the car.
8  Using Arduino / Project Guidance / Re: #28015 ultrasonic rang finder on: Today at 06:11:51 am
Please Sir, I know the value of pingPin !
Code:
const int pingPin = A2;
Do I get extra points for knowing that it also has another value ?
9  Using Arduino / Programming Questions / Re: Rotary Switch to change Arduino Scripts on: Today at 05:00:25 am
As a first step read the analogue input from the switch into a variable and print it.   Now, armed with the value at the 3 different positions (actually you only need the value for the centre position as the 2 ends can be at 0V and 5V)  you can construct a series of if statements to test the value and execute the appropriate code for the switch position.

Note, however, that due to the use of the delay() function in your light sequences, changing the switch position will not immediately make the light sequence change to the newly selected one as the current sequence must end before the switch position is read again.  There are ways round this but get the basic version working first.
10  Using Arduino / Programming Questions / Re: How to find number of "rows" in an array of strings? on: July 28, 2014, 05:21:46 pm
sizeof() returns the total number of bytes used by the array.  In the code posted by the OP it is an array of pointers, so the total size divided by the size of one array element gives the number of elements in the array.
11  Using Arduino / Programming Questions / Re: How to find number of "rows" in an array of strings? on: July 28, 2014, 05:12:44 pm
Try this
Code:
  number = (sizeof(myString) / sizeof(myString[0]));
12  Using Arduino / Programming Questions / Re: How to find number of "rows" in an array of strings? on: July 28, 2014, 05:02:40 pm
Code:
if (myString[i] = NULL)
NO !
13  Using Arduino / Programming Questions / Re: Library Error --> " 'TwoServoAdapter' does not name a type ". on: July 28, 2014, 03:19:33 pm
The arduino is being powered by a seperate square 9V battery. The two AA batteries are just for the servos, also, I have no idea what the current output is of my AA batteries as it isn't written anywhere. (Forgive me I am bad with batteries)
If the 9V battery is what I know as a PP3 then don't expect it to last long before the voltage drops too low.  If you compound this by powering one of the servos from the Arduino 5V pin then expect it to last only a matter of minutes.

Please consider powering the whole thing from 4 AA batteries with the servos powered directly from them and not via the Arduino.
14  Using Arduino / Programming Questions / Re: switches within a counter sketch on: July 28, 2014, 03:13:12 pm
Quote
how do I do that? and what is PITA?
Put Serial.prints at pertinent points in your code so that you can see which portions of it are being executed.  Add prints of the values of important variables too so that you can see if they are what you expect but make sure that you also print labels with the name of the variable to avoid confusion as to what you are seeing.

As to PITA, see the first definition given on http://www.acronymfinder.com/PITA.html
15  Using Arduino / Programming Questions / Re: LCD & button to change lcd.write on: July 28, 2014, 12:03:09 pm
Good point Arrch.  I was trying to keep it simple, but state change detection will certainly be needed as may debouncing.
It would have been better if I had said
Code:
when button 1 changes from not pressed to pressed increment the counter variable
Pages: [1] 2 3 ... 273