Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Internal Interrupts? on: December 06, 2012, 09:19:11 pm
I've researched a bit, and I've ran into a couple of examples of how buttons are used as interrupts. However, the design I'm trying to implement uses analog sensors. Right now, what I want to do is to have my analog sensors flag a boolean to tell the interrupt to execute, not a button. How would I do so?

This is what I have thought up based on what I researched:

    boolean isWall;

    attachInterrupt(isWall, interruptFunction, RISING);

    void loop() {
        if(analogSensor.response > 450) {
                isWall = true;
        normalExecution();  // what it normally does if isWall is false

    void interruptFunction() {
          // code implementation
          isWall = false;  // set isWall back to false after executing interruptFunction

    void normalExecution() {
          // foo
Can someone verify?
2  Using Arduino / General Electronics / Re: 6-wire stepper motor help on: July 12, 2012, 11:31:21 pm
Thanks for all of the help guys,

I think I'm going to try RPCoyle's method with the transistors. It seems simple enough plus, I don't need to go order another part.  Are those BJT's? And will regular diodes work here? Also, is it okay to use a mosfet if I don't have a BJT?

Thank You,
3  Using Arduino / General Electronics / 6-wire stepper motor help on: July 08, 2012, 01:33:27 am
Hello Arduino Community,

I have a 6-wired Unipolar Stepper Motor (KYSAN: 1124014), and I want to hook this up to an Arduino Nano ATMega328 model. I am quite new to hardware and I am mostly a developer so I don't really know how to approach setting this up, hardware wise. Things are quite expensive so I don't want anything to break by hooking it up wrongly.

I know that there are two coils (three wires for one coil) and one of the three wires is the center tap of that coil. Am I suppose to hook up the center taps to the power source (in this case a 9V NiMH battery)? The motor takes in 4V of power. Since there is a power difference, does that mean I have to use some kind of voltage regulator to step down the voltage, or no? Also can I use one 9V for 2 stepper motors and the Nano?

Thank you,
Pages: [1]