Show Posts
Pages: 1 2 3 [4] 5 6 ... 87
46  Products / Arduino Due / Re: android+ arduino due on: May 26, 2014, 06:46:36 am
Dear original poster.

What are you exhibiting - your ignorance? smiley This part of the forum is for displaying finished projects - not for asking questions.  Other parts are for asking questions. I'll ask a moderator to move it.

(Edit added a smiley to avoid it sounding like an insult - which it isnt)
47  International / Scandinavia / Re: Problem med Arduino på Mac 10.5.8 och förstår inte Trubleshooting info on: May 26, 2014, 06:43:56 am
Tyvärr har jag inte en Mac, så jag kan inte hjälpa.  Jag kan gissa  smiley-wink Du skriver "jobb dator" så har dit job kanske fråntagit dig rättigheder at ändra inställningar?

Nåh, jag ser du har en annan tråd i gång i det internationala forumet och några svarar där.  Det är inte bra att ställa sama fråga två gånger. "crossposting" heter det. Det går inte snabbere och nogon slösar sin tid med at svara det samma, derför att han inte ser det är svarat.
48  International / Scandinavia / Re: Katapult - Min første kode on: May 22, 2014, 10:47:36 am
Hint: "firepin" er en konstant. Du har selv erklæret den med værdi 2. Hvornår tror du en konstant skifter værdi?
49  Using Arduino / Project Guidance / Re: Newbie in need of help on: May 21, 2014, 12:08:41 pm
I fixed it. You were missing a bunch of "}"  The first error message you had was due to the loop() started before a "}" closed the previous void setup() .

 Notice that the code here is in a nice seperate box, which makes reading it easier. Also note the indentation - the editor does it if you press ^T. Read the top post on how to post to get these details right.

I do not know if this is the logic you want. The code you supplied had some "}" inside comments (after a "//" on the same line) and thus do not count. I have just sprinkled "}" at the end until it compiled.
Code:
// define pins to be used

int S1 = 2; //switch 1
int S2 = 3;
int S3 = 4;
int L1 = 5; // light 1
int L2 = 6;
int L3 = 7;
int B = 8; //buzzer


void setup() { // initialize the digital pins. // assume switches will wire from ground to input pins
  pinMode(S1, INPUT_PULLUP);
  pinMode(S2, INPUT_PULLUP);
  pinMode(S3, INPUT_PULLUP);
  pinMode(L1, OUTPUT); // leds wired from output pin to ground
  pinMode(L2, OUTPUT);
  pinMode(L3, OUTPUT);
  pinMode(B, OUTPUT); // buzzer wired from output pin to ground
}

void loop() {
  if (!digitalRead(S1)) {
    digitalWrite(L1,HIGH); // turn on lamp 1
    digitalWrite(B,HIGH); // turn on buzzer
    delay(500); // wait 2 seconds
    digitalWrite(B,LOW); // turn off buffer
    delay(5000); // wait 28 more seconds
    digitalWrite(L1,LOW); // turn off lamp 1 }
    if (!digitalRead(S2)) {
      digitalWrite(L2,HIGH); // turn on lamp 2
      digitalWrite(B,HIGH); // turn on buzzer
      delay(500); // wait 2 seconds
      digitalWrite(B,LOW); // turn off buffer
      delay(5000); // wait 28 more seconds
      digitalWrite(L2,LOW); // turn off lamp 2 }
      if (!digitalRead(S3)) {
        digitalWrite(L3,HIGH); // turn on lamp 3
        digitalWrite(B,HIGH); // turn on buzzer
        delay(500); // wait 2 seconds
        digitalWrite(B,LOW); // turn off buffer
        delay(5000); // wait 28 more seconds
        digitalWrite(L3,LOW); // turn off lamp 3
      }
    }
  }
}

Also note that code like
Code:
delay(500) ; // wait 2 seconds
is very confusing. The code says half a second, the comment says 2 seconds. Which did you want?
50  International / Scandinavia / Re: Nybörjare önskar hjälp med att styra ljus med MIDI-keyboard on: May 20, 2014, 04:35:57 pm
Kan man omskriva din projekt beskrivning til at du vil få en given Midi Note at aktivere en utgång på Arduinoen?

Så skal du "bara" få Midi-dataen (som er seriel) ind på en Arduino port (og jag är säker på att det står beskrevet i Midi librarien du använder om opkobblings kredsen) og en et relativ enkel program letar efter den Note kommando i data-strömmen och laver en lille digitalWrite.

När det program funker så kan man udvida det: Göra en upslag lista (Array): kommando - digital port der skal tändas/släckas.

Senere kan der sättas i gång sekvencer med en Note men så skal din programmering klara State-Machine og det er FORBJUDET att använda delay().

Men börja ved början - Midi in - leta efter en bestemt "Note On" - göra en DigitalWrite(13,HIGH) resp digitalWrite(13,OFF) och dermed bevis prototype-1.

Det spelar det ingen roll om det er en liten LED eller en 1000W strålkastare; du skal bare använda en passande transistor, MOSFET, SCR-gate, Relä eller SolidStateRelay för att forstärka den lille Arduino ström til noget större.
51  International / Scandinavia / Re: Goddag alle sammen - Jeres Arduino erfaring? on: May 20, 2014, 04:22:32 pm
Og hvad skal du bruge informationen til?
a) Beslutte om Arduino forumet er kvalificeret nok til dine spørgsmål?
b) Dem der svarer skal i hvert fald have et godt tilbud fra dig om dims D
c) du vil bare have lidt selskab, og skabe lidt gang i Scandinavian forumet ;-)
Og så har du ikke udfyld nogen af dine "fakta" i profilen (som lokation eller køn ...)

Men spørgsmålene er uskyldige nok:
1) 4+ år  2) Jeg skulle bruge en mikrokontroller at styre et par motorer med - se det skrinlagte projekt : http://iwanta3dprinter.wordpress.com/ 3) søg mit navn i Exhibitions forumet.
52  International / Scandinavia / Re: Katapult - Min første kode on: May 20, 2014, 04:18:22 pm
Antagligen har du prøvet om den compilerer og det er gået godt ?
Code:
//Including servo libaery
#include <Servo.h>

//Assaigning a name to the servos  <-- nej, det instantierer 3 "Servo objekter", så du kan styre 3 styks.
Servo servo_spring, servo_direction, servoer_blocker;

//Assining Potmeters pins
const int springPin = A0;
const int directionPin = A1;
const int blockerPin = A2;
const int firePin = 2;
const int releasePin = 3;

void setup(){
 
  //Servo Pin Assignment  <-- OG Initialising, and powering up the servos
  servo_spring.attach(9);
  servo_direction.attach(10);
  servo_blocker.attach(11); 
 
  //pinMode OUTPUT
  pinMode(releasePin, OUTPUT);
 
  //pinMode INPUT
  pinMode(firePin, INPUT);
 
  }
void loop(){

  //Spring Tension - Adjustment
  val1 = analogRead(springPin);
  val1 = map(val1, 0, 1023, 0, 180);
  delay(15);
 
  //Direction - Adjustment
  val2 = analogRead(directionPin);
  val2 = map(val1, 0, 1023, 0, 180);  <-- Der røg det møjsomligt indsamlende directionPin værdi ud af vinduet
  servo_direction.write(val2);
  delay(15);
 
  //Blocker Adjustment
  val3 = analogRead(blockerPin);
  val3 = map(val1, 0, 1023, 0, 180); <-- igen, cut-n-paste fejl ;-)
  servo_blocker.write(val3);
  delay(15);
 
  //Fire Action
  if (firePin == HIGH ){  <-- forkert. Det her vil ALTID være ikke-sand
  servo_spring.write(val1);  <--- dvs ALDRIG ekskvere dette.
  delay(1000);
  digital.write(releasePin, HIGH);
   
}
Men de fleste ting vil du opdage når du bare kobbler dine 3 servo op (uden katapulten) og det ligger på bordet og gør slet ikke det du forventede.

Men det er det rigtig sjove ved denne hobby !
53  Using Arduino / Programming Questions / Re: How to poll an analog pin until it is "High" on: May 13, 2014, 02:48:23 pm
 smiley-red oops.
54  Using Arduino / Programming Questions / Re: How to poll an analog pin until it is "High" on: May 13, 2014, 01:33:19 pm
Hint as to why
Code:
analogWrite (pin[k], analogRead (inputPin [k]) / 4);
is flawed:
==> Why you may need to use the map() function.

BTW - editing the top post makes it VERY hard for others to follow the thread as the earlier version of your question has disappeard, but the answers still stand in the thread.  I do not get the connection between making a LED intensity follow an analog input and the triangle wave fader.
55  Community / Exhibition / Gallery / Re: Blink without "delay()" - stepping up. on: May 12, 2014, 01:15:07 am
Code:
led1State = !led1State;//Invert Led1State, HIGH becomes LOW and LOW becomes HIGH.
Strictly speaking that is bad - HIGH / LOW are not the same as true / false. They may map to it, but it is a different "type".

I'd also add an explanation that, although this code only blinks LEDs, the principle can be use to time anything.
Oh yes, indeed. But, I have found through reading "a few" examples and newbie question that somehow for them going from a LED example to something else is too abstract/large a leap. Many want to see an example of one LED + one stepper or two DC motors or one button scan + two LEDs or any other specific combination.
56  Community / Bar Sport / Re: ship in a bottle 3D printer on: May 09, 2014, 03:10:04 pm
Good idea - but the laser beam will be distorted by the glass bottle. Still, it is a predictable distortion, also one that could be measured by first printing a grid (whioch you destroy and remove) and the software does the anti-distortion. I am skimming over focusiing problems.

Unless the beam comes in like the plastic prong drawn by Boffin1.

57  Community / Bar Sport / Re: Post your code on: May 09, 2014, 03:03:10 pm
Oh, how happy I am I managed to see this post. (I have times where life is to busy to read The Forum, and there is too much to catch up)

And by the 3rd line in the OP my mind was humming "Let it Be". Why, one wonders? There are not that many clues by then. Ah well, all the more the enjoyment og GMs vocal interpretation.

Defenitly nice - the lyrics. The song - well, we do not need to rate that. It is c l a s s i c 
58  Using Arduino / Project Guidance / Re: 2 Stepper Motors with 300 to 600 rpm on: May 07, 2014, 07:23:54 am
... And it will give me higher speed and smaller torque..
Will the motor turn if the supply to it is only 0.5A?
The lower amperage does not in any way imply that you get higher speed. I am saying that you can get enough speed even though you limit your current, and the formula-webpage implied that you could not reach full speed if you wanted full current.

The motor will turn with maybe only 100mA. I do not know, but for many steppers "just" turning you do not need a lot of mA. (I cant be bothered right now to read the fineprint in the spec sheet)

If you buy the chip, have you got knowledge/equipment to do the circuit board? I am worried as the discussion so far has shown that your electronics knowledge is not that great. (Nor is mine that great, really, but enough for the projects that I do) I would by something like http://www.pololu.com/product/2133 - then it is much simpler. Also worry about the heat from the chip - it needs plenty air or a little heatsink.
59  Using Arduino / Project Guidance / Re: 2 Stepper Motors with 300 to 600 rpm on: May 07, 2014, 02:29:05 am
You only need all those Amperes if your motors need maximum torque, You have almost no load. (Well, I do not really know. Presumably there is some load as the vibrations you want to induce require energy, ie there is some transfer of mechanical energy from the turning eccentric).

Remember, you adjust the circuit of the DRV8825 to limit the current. (Are you buying the chip, or a board with supporting electronics?) For your experiment you want to supply as little current as possible - this will reduce the vibrations the motor itself generates.

I played a bit with the calculator link you supplied. Notice that as you decrease the current the calculated max speed increases. The calculation is just modelling a "simple" coil. It assumes you must get to Imax. If your speed is higher, then it simply does not get to Imax,, but the motor still turns at the higher speed. This is what the diagrams of the motor manufacture show - as speed increases the torque drops; the torque is proportional to the current and at high speed the current in the coil does not reach max value before it is turned off - that is what inductance does, so to speak. All sort of effects also play in, but the manufacture shows an actual measured curve.
60  Using Arduino / LEDs and Multiplexing / Re: 3 buttons for 3 LEDS - SOLVED on: May 04, 2014, 10:40:00 am
Well, if it works then everybody is happy. smiley

If it works and you do not know why it suddenly worked, then you may suddenly have a surprise. (It stops working)

Some possible faults have been mentioned. In addition I can suggest you may not have the wiring you think you have - which is why the troubles started with the 3rd LED/button. You may have an errenous wiring one that is wrong but happens to work for the wrong reasons.
Pages: 1 2 3 [4] 5 6 ... 87