Show Posts
Pages: 1 ... 13 14 [15] 16 17 ... 235
211  Using Arduino / Programming Questions / Re: any code for arduino to stop servomotor ? on: March 26, 2014, 11:22:53 am
Try the sweep example from the servo library.  Does that work ?
212  Using Arduino / Programming Questions / Re: No matching call for WirelessController... on: March 26, 2014, 11:18:57 am
The constructor for the WirelessController library, taken from WirelessController.h is as follows
Code:
// Constructor for the class. Receives all of the data describing
// the protocol we want to send and/or receive
WirelessController( unsigned long *marks_duration,
int *message_code_start,
int *message_code_one,
int *message_code_zero,
int *message_code_end,
byte number_of_marks,
byte number_of_marks_start,
byte number_of_marks_bit,
byte number_of_marks_end,
byte mark_tolerance,
byte encoding_type,
byte input_type,
int number_of_bits);
As you will see there are 13 parameters.

Contrast that with your code, which I assume is from one of the examples
Code:
WirelessController homeeasy = WirelessController(mark_duration_294, message_code_start_294,
                               message_code_one_294, message_code_zero_294, message_code_end_294,
                               3, 1, 2 ,2 ,30, ENCODING_PULSE_WIDTH, 28 );
There are only 12 parameters being passed.
213  Using Arduino / Programming Questions / Re: No matching call for WirelessController... on: March 26, 2014, 10:58:09 am
Code:
unsigned long mark_duration_294[3]  = {331, 943, 4800};
int message_code_start_294[1]       = {-1};
int message_code_one_294[2]         = {2, -1};
int message_code_zero_294[2]        = {1, -2};
int message_code_end_294[2]         = {1, -3};
WirelessController homeeasy = WirelessController(mark_duration_294, message_code_start_294,
                               message_code_one_294, message_code_zero_294, message_code_end_294,
                               3, 1, 2 ,2 ,30, ENCODING_PULSE_WIDTH, 28 );
You are passing the names of arrays to the WirelessController library but the error message seems to indicate that is not what it expects.

Do you have a link to the library ?
Did you write this code yourself or is it taken from an example supplied with the library ?
214  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.
215  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 ?
216  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.
217  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 ?
218  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 ?
219  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.
220  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.
221  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.
222  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
223  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.
224  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.
225  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.
Pages: 1 ... 13 14 [15] 16 17 ... 235