Show Posts
Pages: 1 ... 39 40 [41] 42 43 ... 266
601  Using Arduino / Programming Questions / Re: Servo Circuit on: May 23, 2014, 12:25:36 pm
It's a matter of taking all the reds to the + side of the power supply, the blacks to the - of the power AND to the Arduino GND of course, and each yellow to a suitable different digital pin on the Arduino.

The pic attached (source: zoomkat) shows just one, but follow my words above and you'll be good. Budget 1A for each servo though...
602  Using Arduino / Programming Questions / Re: I need help with sequence with millis() on: May 23, 2014, 09:50:44 am
You may find this video useful, over and above the stuff you've read already.

It's on YouTube, posted by a forum member by the name of Jasmine2501.

https://www.youtube.com/watch?v=3VZgaJBrZD8
603  Topics / Robotics / Re: Map Function on: May 23, 2014, 08:51:55 am
Is the debug print of your sval giving you a value of 255 at the right time?
604  Using Arduino / Interfacing w/ Software on the Computer / Re: loop on: May 23, 2014, 07:11:24 am
Well I never got as far as pointers so I still have no idea what that loop; in the middle of loop() is doing.
605  Using Arduino / Interfacing w/ Software on the Computer / Re: loop on: May 23, 2014, 06:57:32 am
Quote
It's just verifying that the function point "loop" is zero or non-zero, and then discarding the result.

Must confess, I have no clue what that means... what's a "function point"?
606  Using Arduino / Interfacing w/ Software on the Computer / Re: loop on: May 23, 2014, 05:13:02 am
I'm not sure what effect loop; inside loop() will have, but I'm surmising it'll just keep going back to the top of loop() every time it sees loop;.

I've never seen loop being called from inside itself before....

Code:
void loop()                    
{
  if (Serial.available() > 0) {
    // read the incoming byte:
    incomingByte = Serial.read();
    loop;  // ?????????????????????????????????????????????????
    if(incomingByte == 105){
      spin = analogRead(0);

  Serial.println(spin, DEC);
  {
607  Topics / Education and Teaching / Re: Tutorials for beginner on: May 23, 2014, 04:04:01 am
Crossroads, you are showing remarkable restraint not mentioning your book, so I'll do it as an independent punt....

http://www.amazon.com/Arduino-Teens-For-Course-Technology/dp/1285420896
608  Using Arduino / Programming Questions / Re: for loops aren't running one at a time. on: May 23, 2014, 02:43:11 am
Quote
@Stomper90, now that the three Threads have been merged perhaps you can see how much confusion has arisen.

I think the best thing is for you to post your most recent code (again, if necessary) so we can all start from the same place.

Or better yet, might be an idea for the mods to lock this thread and then Stomper can start a fresh one, taking it from the top so to speak.
609  Using Arduino / Project Guidance / Re: Need some technical informations and advices. on: May 22, 2014, 06:27:07 am
Here in South Africa, my questions would not be of a technical nature, but rather how to prevent  the whole bloody thing getting stolen.
610  Using Arduino / Motors, Mechanics, and Power / Re: Would this power supply run 2 nema 17 motor? on: May 22, 2014, 04:37:11 am
The point here is surely, as CR points out, that the electrical characteristics of the OP's motors are not known to us.

The NEMA specs merely give the physical size of the unit and specify mounting hole details; they are silent on the electrical aspects. That's pretty clear from CR's link, where a vendor shows various NEMA17s of different torque and therefore presumably of differing voltage and current.
611  Using Arduino / Programming Questions / Re: for loops aren't running one at a time. on: May 22, 2014, 04:09:44 am

for(; ; ; )


You mean:

Code:
for(;;);
612  Using Arduino / Programming Questions / Re: for loops aren't running one at a time. on: May 22, 2014, 03:44:30 am
Thanks JimboZA, that helped a lot with the understanding.

I merely wrote down what i observed the stepper motors doing just btw ^^

You're welcome.

If the stepper driven by the top "for" isn't doing what you expect (ie, not moving) that might be a wiring fault, or the stepper may be broken, and that would lead you to think the top "for" wasn't activating.

Apart from the valuable debug prints, the suggestion above somewhere to have an led turn on in the top "for" and off in the bottom one would also have shown both were active. (Or a red one on in only the top "for" and a green one on only in the other one, might be a more positive way of showing where the path through the code has gone.)
613  Using Arduino / Project Guidance / Re: Arduino code for fuzzy logic controller on: May 22, 2014, 02:58:15 am
Fuzzy logic is a marketing term. Technically, it is called "an algorithm". It uses '0' bits and '1' bits with no fuzziness in between.

The fuzziness in fuzzy logic has nothing to do with fuzz between 0s and 1s. It's to do with set membership. In typical crisp logic, Venn diagram stuff, an element is either "in" a set or "not in" a set; something's either "hot" or "cold", or "tall" or "short". In fuzzy logic, an element can be a member of both the "tall" and "short" sets.

The output is never fuzzy, in the sense that a set of inputs will give the same output each time, unless the algorithm or its parameters have changed in the meantime.
614  Topics / Robotics / Re: Arduino robot questions on: May 22, 2014, 02:16:26 am
Quote
   the Arduino Robot:

I don't know what Arduino Robot your talking about . I think there's hundreds of arduino robots. Post a link to it.


While it's true to say that there are hundreds of robots built on Arduinos, afaik there's only one Arduino Robot, as in Arduino branded, and that's this guy here. That's probably what the OP's talking about.
615  Using Arduino / Programming Questions / Re: Programing a range of values from an analog pin to execute a certain function on: May 22, 2014, 01:47:54 am

to execute a certain function.

The idea is there are several programs I want to use the sliding potentiometer to select.


Those aren't the same thing. Arduinos only run one program, but yes, you can have loads of functions.

So all you need is to have an "if" statement to check the values, and use the && to test  ranges. Say you have already read the pin into a variable called "myPotVal", then you do this:

Code:
if (myPotVal > 0 && myPotVal <65)
{
  // do some stuff here
  // this could be either in-line code here, or a call to a function
}
else if (myPotVal > 64 && myPotVal <129)
{
  // do some other stuff here
  // this could be either in-line code here, or a call to a different function
}
Pages: 1 ... 39 40 [41] 42 43 ... 266