Show Posts
Pages: [1] 2 3 ... 126
1  Using Arduino / Programming Questions / Re: Time checking on reset on: April 23, 2014, 06:12:04 pm
Layout your code ( the IDE gives you a tool to do it with just two clicks - it will help you more that it does us!) and PSOT IN CODE TAGS - THE # not in a "quote".

Mark
2  Using Arduino / Programming Questions / Re: Making a DC motor wait for conditions on: April 23, 2014, 05:58:29 pm
As I said if you are in a call to delay() no other part of your program does any thing. So for what you want do do you must look at the blink without delay example, and then because  you want to combine different thing like a 30's delay but if the LDR value does somthing and something else you need to look at FSM (Finite State Machines) in the playground section of the site. But you should NEVER EVER USE delay(). again look at blink without delay.

Mark
3  Using Arduino / Programming Questions / Re: Need help with my first non linear program on: April 23, 2014, 02:49:27 pm
Start by looking in the ref section at arrays. That will get rid of the need to have a named var for each cylon eg cylon1, cylon2 ect become cylon
  •   ( where x is the number of the cylon.). You can get rid of the need for a function for each cylon by passing the cylon number as a parameter.

A struct takes this to the next level. Is all in the ref section.

The language is C/C++ and with a very few exceptions every thing from any of the C/C++ sites can be used.

The main exceptions are  I/O (Streams/stdio) and String.

Mark
4  Using Arduino / Programming Questions / Re: Help Using millis() on: April 23, 2014, 02:39:35 pm
Blink without delay is an example of a simple finite state machine (FSM). Look them up in the playground.

Mark
5  Using Arduino / Programming Questions / Re: Making a DC motor wait for conditions on: April 23, 2014, 02:36:30 pm
Of course as you can't check the elapsed time or your sensors when using delay() you need to learn to do without it. So see blink without delay!

Mark
6  Using Arduino / Project Guidance / Re: crazy question on: April 23, 2014, 05:03:41 am
Of course if you add up the cost of the mega and the gsm shields and the e-net shield and any other bits you find it cost more than a cheap end PC which can do it all any way.

Mark
7  Using Arduino / Programming Questions / Re: help me plzzz on: April 22, 2014, 07:00:12 pm
Your first step is to get the motor to do what you want, so create a new sketch for just motor control and work on that. After that you can look at the other parts of the problem.

Mark
8  Using Arduino / Programming Questions / Re: Help Using millis() on: April 22, 2014, 06:43:56 pm
This is where you are going wrong

Code:
        if(currentMillis - previousMillis > interval) {
          // save the last time 
            previousMillis = currentMillis;   
              noteOff(0, note, 60);
Think about it.

Then look at blink without delay. Next time post the whole of your code never post a snippet!

Mark
9  Using Arduino / Project Guidance / Re: void loop() 1 void loop() 2 on: April 18, 2014, 06:11:32 am
You don't you get rid of the delays - see blink without delay.

Mark
10  Using Arduino / Project Guidance / Re: throttle on: April 13, 2014, 03:08:25 pm
You problem is in the software or may be the hardware. How can we tell from your post.

Mark
11  Using Arduino / Programming Questions / Re: Arduino Uno: Problems with Serial.print() on: April 13, 2014, 02:55:49 pm
Quote
The power comes from my computer via USB.

Yes you (at best) 500mA for every thing (Uno included). Try disconnecting the transistors from the uno and then run the code.

Mark
12  Using Arduino / Programming Questions / Re: Arduino Continuous Rotation Servo on: April 13, 2014, 12:12:28 pm
Ignore the code read the post. This is what the op wants.
Quote
I am trying my best to get it rotating for a set amount of time.
. theres just no point in trying to "fix" the mess of code the OP had.

Mark
13  Using Arduino / Programming Questions / Re: Arduino Uno: Problems with Serial.print() on: April 13, 2014, 12:03:35 pm
Quote
I will try resetting the Arduino as soon as the problem occurs again.

No I mean that you should try it and tell is what you get.

Where is you power coming from? You are not powering the relays from the transistors you are controlling the power to the relays with the transistors.

Mark
14  Using Arduino / Programming Questions / Re: Arduino Uno: Problems with Serial.print() on: April 13, 2014, 07:49:41 am
Try this - with the serial monitor open press the reset button on your uno. Do you get "Betriebsbereit.".

My uno's packed away for a house move, and I can't remember if the serial monitor still works after a reset.

How are you powering the relays if its from the Uno then you are (most likely) causeing it to reset.

Mark
15  Using Arduino / Programming Questions / Re: Arduino Continuous Rotation Servo on: April 13, 2014, 07:07:32 am
The op wants to have the servo do one thing and then after a given amount of time do something else. This is exactly what blink and blink without delay do.

That is a servo and not a Led is not relevant to anything.

Mark
Pages: [1] 2 3 ... 126