Show Posts
Pages: 1 ... 5 6 [7] 8 9 ... 289
91  Using Arduino / Programming Questions / Re: Can't make button increment my Array :( on: August 21, 2014, 04:25:16 am
You need to increment the index variable when the button becomes pressed, not when it is pressed.  Look at the state change detection example in the IDE to see how to do it.

Also consider using
pinMode(menuBut, INPUT_PULLUP);
to activate the internal pullup resistor and remove the external pull down resistor if you have one, which I suspect you don't, and wire the button to pull the pin low when pressed.  This will ensure that the input is always at a known voltage and not floating between 0V and 5V.  Note that when you do this you will need to invert the logic of the test to see whether the button is pressed.
92  Using Arduino / Programming Questions / Re: Can I have an advice for "Bounce"? on: August 21, 2014, 01:55:12 am
"Bounce" dose not name a type
It sounds like you have the library installed in the wrong place or with the wrong name or did not stop and restart the IDE after installing it.

The library folder named Bounce should be placed in the libraries folder of your sketch folder.  There should be a file named Bounce.h in the folder and possibly one called Bounce.cpp.  The filenames must match the folder name exactly.

Please post your program as it is also possible that you are not including the library properly.
93  Using Arduino / Programming Questions / Re: Compiling USB shield on: August 21, 2014, 01:14:16 am
I can't get it compile at all.
and the full error message is ........... what ?
94  Using Arduino / Programming Questions / Re: Controlling motors with pushbuttons (2 pin) on: August 20, 2014, 07:19:46 am
  int inPin_Forward = 10;   // choose the input pin (for a pushbutton)
  int inPin_Reverse = 11;
  int inPin_Right= 12;
  int inPin_Left= 13;
Why bother giving the input pins names when you never subsequently use them ?
While you are at it I suggest that you make them bytes instead of ints to save space and make them const because the pin numbers are not going to change when the program is running.
95  Using Arduino / Programming Questions / Re: Controlling motors with pushbuttons (2 pin) on: August 20, 2014, 05:53:44 am
Please post your complete program.  The snippets that you have posted are no use at all in diagnosing the problem. 

How is the pushbutton wired ?  Does it have a pullup or pulldown resistor so that the voltage on the input pin is at a known voltage at all times ?  If not then consider using
pinMode(inPin_Forward, INPUT_PULLUP);
to activate the built in pullup resistor.
96  Using Arduino / Programming Questions / Re: Servos not working/responding, on: August 20, 2014, 01:12:27 am
I was afraid of that answer :/ oh well, is there any way i can avoid this?
No.  Servos, particularly when they are used to drive a robot (by the way, they are not then technically servos but motors with speed control) take a large current, so a substantial power supply is needed.
97  Using Arduino / Programming Questions / Re: Servos not working/responding, on: August 19, 2014, 03:36:02 pm
all power is in one line on a breadboard going back to the 5v pin.
If that is not causing the present problem then it will cause others in the future.  The Arduino voltage regulator is simply not up to the job of powering 2 servos used as drive motors.  At the best the servos will move erratically and the Arduino may reset as the servos draw current and cause the 5V rail voltage to drop.  This is exacerbated if the power source is not up to the job, such as using a PP3 9V battery.  At worst the current drawn by the servos will burn out the Arduino power regulator.

Use an external power source for the servos such as 4 AA batteries with a common ground.
98  Using Arduino / Programming Questions / Re: how can I have more than 6 alarms using TimeAlarms library on: August 19, 2014, 11:26:11 am
Have you read the readme that comes with TimeAlarms ?
It explains how to expand the number of alarms that can be set and the amount of memory needed.
99  Using Arduino / Programming Questions / Re: SD.begin breaks function on: August 19, 2014, 02:55:26 am
SD.begin() begins use of the SPI bus which uses pins 11, 12 and 13 on most Arduino boards, so pin 13 cannot be used as an output when SPI is in use.
100  Using Arduino / Programming Questions / Re: Arduino Twitter 'Ethernetn Client' Issue on: August 19, 2014, 01:17:39 am
It looks like you need to import the Ethernet library into your program
101  Using Arduino / Programming Questions / Re: Issue with a very simple library on: August 18, 2014, 04:45:15 am
my library is called Sim908.
It is in folder
Which folder is the libraries folder in ?
102  Using Arduino / Programming Questions / Re: Solved : count pulses with timer1 or timer2 on: August 18, 2014, 04:24:06 am
   delay(tiempo); // Sin esto no funciona
Can you explain what this is for as the comment says that it does not work ?
103  Using Arduino / Programming Questions / Re: Code Error on: August 18, 2014, 02:38:26 am
Does the term EthernetClient appear anywhere in the code ?
Seeing the full error message would be more helpful ?
104  Using Arduino / Programming Questions / Re: OrangeRX used for sending data files on: August 17, 2014, 04:22:01 am
Is the Orange device that you provided a picture of a transmitter or a receiver ?
I am familiar with Orange RC receivers and you can get Orange modules to fit in FrSky transmitters.  Can you provide a link to the device pictured ?
105  Using Arduino / Programming Questions / Re: count pulses with timer1 or timer2 on: August 17, 2014, 03:00:13 am
You are generating the pulses so you can count them by incrementing a variable as each one is produced.
As to the time taken to produce 300 pulses, save micros() before you start generating the pulses and save it again when the pulse counter reaches 300.  Take the start value from the end value and that is the elapsed time.

This sounds dreadfully simple.  Post your current program here for more help.
Pages: 1 ... 5 6 [7] 8 9 ... 289