Show Posts
Pages: 1 ... 14 15 [16] 17 18 ... 236
226  Using Arduino / Programming Questions / Re: any code for arduino to stop servomotor ? on: March 26, 2014, 10:52:16 am
How are you powering the servo ?  The Arduino digital pins cannot supply enough current for standard size servos.
227  Using Arduino / Programming Questions / Re: any code for arduino to stop servomotor ? on: March 26, 2014, 08:54:03 am
The code works for me using a real servo, but I am not surprised. 
Like Paul I suspect that what you have is not a servo at all.  Can you give a link to it ?
228  Using Arduino / Programming Questions / Re: Blinking Light with Switch on: March 26, 2014, 08:08:34 am
Quote
What should I do if not using delay to blink the LED?
In your code, if ledOn is true then two 500 millisecond delays will be triggered and during each of them the Arduino will do nothing.  So, for one second it cannot read your switch.  One second may not sound like much but it will seriously affect how responsive your system is to inputs.

You need to consider using millis() as in the BlinkWithoutDelay example in the IDE so that your program can read a switch whilst blinking the LED.
229  Using Arduino / Programming Questions / Re: GSM MOdem testing Basics on: March 26, 2014, 03:06:14 am
Firstly the files are in the wrong place.  Move the GSM folder to the libraries folder in the folder where you save your programs.

What are the names of the files in the GSM folder ?  Are you sure that they don't have an extension or have you got the horrible Windows 'hide extensions for known file types' turned on ?
230  Using Arduino / Programming Questions / Re: GSM 900 sms ÿÿ0€ error reading sms messages on: March 26, 2014, 02:36:22 am
Are you sure that you have the baud rates set correctly ?
231  Using Arduino / Programming Questions / Re: I2C communication on: March 26, 2014, 02:15:15 am
http://arduino.cc/en/Tutorial/MasterReader will show you how to connect a  slave to a master device and how to comminicate from the master to the slave. 

The example actually sends data back to the master but this does not have to be implemented.  The function executed by the Wire.onRequest() could top/start actions on the slave by setting a flag and then change its state on receipt of a second message.
232  Using Arduino / Programming Questions / Re: GSM MOdem testing Basics on: March 26, 2014, 02:06:59 am
Where have you installed the library files ?
They should be in a folder with exactly the same name as the .h file in the libraries folder in the folder where your programs are saved.
233  Using Arduino / Programming Questions / Re: any code for arduino to stop servomotor ? on: March 26, 2014, 02:00:42 am
Quote
For example once the servo turns to 90 degree , instead of delay and turn back to the actually position i want it to stop completely for good.
It is your program that is causing the servo to move from its 90 degree position, so remove the code that does it or prevent it running as has been suggested. 

If you posted your code it would be easier to provide help.
234  Using Arduino / Programming Questions / Re: Delay quicker then 1 milli on: March 25, 2014, 05:14:05 pm
Quote
tsunami warning bacon
That would be a pig to debug though  smiley
235  Using Arduino / Programming Questions / Re: Electronic dice programming on: March 25, 2014, 03:10:54 pm
Take a look at switch/case
Yours dice will always be in one of 7 states (if you include it being blank).  For each state use switch/case to display the appropriate LEDs.  Read the buttons.  If the NEXT button is pressed increment the state number.  If the PREVIOUS button is pressed decrement the state number.  Deal with the rollover either way.

You should consider only changing the state number when a button becomes pressed, not while it is held down, and debouncing the inputs would be a good idea too.
236  Using Arduino / Programming Questions / Re: Variable Value as "delay()" parameter? on: March 25, 2014, 12:09:48 pm
yes, it did occur to me to place the variable inside the "time value" of the "delay()" parameter, the compiler doesn't like it, it throws and error, it highlights that line and says "value is not ignored as is ought to be" apparently the parameter "delay()" is something you can't change like a variable, it  can be replaced  with another delay, but i think it cannot be changed, is really frustrating because i got all working but the most important thing
Can you post a program that causes the error ?  It does not have to be your full program,  just one that should compile but doesn't.
237  Using Arduino / Programming Questions / Re: Error: 'Hx711' does not name a type on: March 25, 2014, 11:48:49 am
Sorry, but I still can't tell which libraries folder that you have installed it in.
238  Using Arduino / Programming Questions / Re: Error: 'Hx711' does not name a type on: March 25, 2014, 07:32:59 am
Quote
it extracts to a folder under the libraries folder
but which libraries folder ?
The one in the folder where your sketches are filed (correct) or the one under Program Files\Arduino (incorrect) ?
239  Using Arduino / Programming Questions / Re: Create an Alarm with a specific AlarmID using the TimerAlarm library on: March 25, 2014, 05:32:40 am
As you say, the ID is created when the alarm is created so it is unlikely that you can do what you want without changing the library.  However, as you can discover what ID has been allocated when an alarm is created and save that for later use, what is the problem ?
240  Using Arduino / Programming Questions / Re: conversions string to int, long int, unsigned long int, and visa versa. on: March 25, 2014, 03:34:47 am
Quote
i always had a bit the feeling that arduino C was a subset of C
The Arduino IDE uses a superset of C++ (extra Arduino specific functions added), so the normal C functions supported by C++, such as conversion of data types described in this thread are all available.
Pages: 1 ... 14 15 [16] 17 18 ... 236