Show Posts
Pages: [1] 2 3
1  Using Arduino / Motors, Mechanics, and Power / Re: bipolar stepper motor control through stepstick a4988 with arduino uno on: May 08, 2014, 02:55:58 am
I changed breadboards and everything is working now. guess I had a current issue.
What worked for me was the original code.
thanks for your help
2  Using Arduino / Motors, Mechanics, and Power / Re: bipolar stepper motor control through stepstick a4988 with arduino uno on: May 08, 2014, 01:43:21 am
yep tried it nothing
3  Using Arduino / Motors, Mechanics, and Power / Re: bipolar stepper motor control through stepstick a4988 with arduino uno on: May 08, 2014, 01:22:00 am
http://fritzing.org/projects/a4988-single-stepper-test
its pretty much wired like this. OR I should say at one time it was exactly wired this way. now the jumpers are different. I read through those pages of the  a4988 data sheet .
sleep and reset are connected to each other. I have also tried pulling them high and low. I have looked at all the wiring diagrams I could find for connecting this board and it seems super straight forward. 12 volt in 5 volt in stepper coils in. enable step and direction for the arduino. there are just a few variants for the microstepping but overall they are pretty much all wired the same.

the code and wiring was from the youtube video from tony buser.
I know it has to be something simple as to not having something high or low
4  Using Arduino / Motors, Mechanics, and Power / Re: bipolar stepper motor control through stepstick a4988 with arduino uno on: May 08, 2014, 12:34:35 am
http://postimg.org/image/t4j72wdk5/

I as well have a wire connecting the ground of the arduino with the ground of the 12 volt power supply
5  Using Arduino / Motors, Mechanics, and Power / bipolar stepper motor control through stepstick a4988 with arduino uno on: May 07, 2014, 10:09:03 pm
hello
I am building a sphere bot and for the life of me can't get the any stepper motors to turn with a stepstick

I am using this to test
https://www.youtube.com/watch?v=xd-AtAPNpxo
Code:
/*
stepper test sketch for pololu stepper driver board.
 
connect enable pin to arduino pin 10
connect step pin to arduino pin 9
connect direction pin to arduino pin 8
 
The sketch lights led13 and runs the stepper 400 steps in one direction
then it waits on second, then turns off the led13 and runs the stepper 400 steps in the other direction
It waits another second then repeats the 400 one way 400 the other way.
 */
 
int ledPin =  13;    // LED connected to digital pin 13
int enx = 10;
int stepx = 9;
int dirx = 8;
 
// The setup() method runs once, when the sketch starts
 
void setup()   {               
  // initialize the digital pin as an output:
  pinMode(ledPin, OUTPUT);   
  pinMode(enx, OUTPUT);   
  pinMode(stepx, OUTPUT);   
  pinMode(dirx, OUTPUT); 
  digitalWrite(enx, HIGH);
  digitalWrite(stepx, LOW);
  digitalWrite(dirx, LOW);
 
}
 
// the loop() method runs over and over again,
// as long as the Arduino has power
 
void loop()                   
{
  digitalWrite(enx, LOW);
  digitalWrite(dirx, HIGH);
  digitalWrite(ledPin, HIGH);   // set the LED on
for (int x = 0; x<400; x++){
  digitalWrite(stepx, HIGH);
  delay(1);
  digitalWrite(stepx, LOW);
//  delay(1);
}
 
  delay(1000);     // wait for a second
  digitalWrite(ledPin, LOW);    // set the LED off
  digitalWrite(dirx, LOW);
for (int x = 0; x<400; x++){
  digitalWrite(stepx, HIGH);
  delay(1);
  digitalWrite(stepx, LOW);
//  delay(1);
}
  digitalWrite(enx, HIGH);
  delay(1000);                  // wait for a second
}

So my setup is exactly like tony's in the video except mine is an arduino uno
I am getting 12 volts and 5 volts respectively. have it set to 16x microsteps ( I as well have tried every combination of jumper )

I know the stepper driver works because it runs a motor on my ramps board.

I tried a 20 volt 4.5amp power supply instead of the 12 volt 2.5 amp that I originally had on it. nothing

I am stumped on this
any thoughts

thanks
bryan
6  Topics / E-Textiles and Craft / Re: Small powersource based on motion needed! on: September 06, 2012, 01:20:13 am
this is what I would like to build for my bike for lighting
http://www.instructables.com/id/Contactless-dynamo-powering-bike-safety-lights/

let me know if you make this.

thanks
bryan
7  Using Arduino / LEDs and Multiplexing / Re: direct wire 8x8 led matrix compile error on: June 19, 2012, 07:22:25 pm
commented the math.h one using arduino 22
this is my error
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp: In static member function 'static void FrequencyTimer2::setOnOverflow(void (*)())':
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp:51: error: 'TIMSK' was not declared in this scope
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp:51: error: 'OCIE2' was not declared in this scope
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp:52: error: 'TIMSK' was not declared in this scope
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp:52: error: 'OCIE2' was not declared in this scope
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp: In static member function 'static void FrequencyTimer2::setPeriod(long unsigned int)':
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp:99: error: 'TCCR2' was not declared in this scope
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp:102: error: 'OCR2' was not declared in this scope
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp:103: error: 'COM20' was not declared in this scope
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp: In static member function 'static long unsigned int FrequencyTimer2::getPeriod()':
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp:113: error: 'TCCR2' was not declared in this scope
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp:114: error: 'OCR2' was not declared in this scope
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp: In static member function 'static void FrequencyTimer2::enable()':
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp:150: error: 'TCCR2' was not declared in this scope
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp:150: error: 'COM20' was not declared in this scope
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp: In static member function 'static void FrequencyTimer2::disable()':
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp:160: error: 'TCCR2' was not declared in this scope
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2\FrequencyTimer2.cpp:160: error: 'COM20' was not declared in this scope
8  Using Arduino / LEDs and Multiplexing / Re: direct wire 8x8 led matrix compile error on: June 19, 2012, 07:10:04 pm
when using the test example for frequencytimer2 in arduino 1.01 I get this error

In file included from Test.cpp:4:
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2/FrequencyTimer2.h:30: error: 'uint8_t' does not name a type
Test.cpp: In function 'void setup()':
Test.pde:-1: error: 'FREQUENCYTIMER2_PIN' was not declared in this scope
9  Using Arduino / LEDs and Multiplexing / Re: direct wire 8x8 led matrix compile error on: June 19, 2012, 07:04:39 pm
downloaded arduino 1.01 and this is my new error


In file included from sketch_jun19a.cpp:13:
C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino backups\libraries\FrequencyTimer2/FrequencyTimer2.h:30: error: 'uint8_t' does not name a type
10  Using Arduino / LEDs and Multiplexing / direct wire 8x8 led matrix compile error on: June 18, 2012, 04:27:13 am
I am trying to get the playground direct wire led matrix working and I keep getting compile errors
this is the code i am using


Code:
/*
 * Show messages on an 8x8 led matrix,
 * scrolling from right to left.
 *
 * Uses FrequencyTimer2 library to
 * constantly run an interrupt routine
 * at a specified frequency. This
 * refreshes the display without the
 * main loop having to do anything.
 *
 */

#include <FrequencyTimer2.h>

#define SPACE { \
    {0, 0, 0, 0, 0, 0, 0, 0},  \
    {0, 0, 0, 0, 0, 0, 0, 0}, \
    {0, 0, 0, 0, 0, 0, 0, 0}, \
    {0, 0, 0, 0, 0, 0, 0, 0}, \
    {0, 0, 0, 0, 0, 0, 0, 0}, \
    {0, 0, 0, 0, 0, 0, 0, 0}, \
    {0, 0, 0, 0, 0, 0, 0, 0}, \
    {0, 0, 0, 0, 0, 0, 0, 0} \
}

#define H { \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 1, 1, 1, 1, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}  \
}

#define E  { \
    {0, 1, 1, 1, 1, 1, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 1, 1, 1, 1, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 1, 1, 1, 1, 1, 0}  \
}

#define L { \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 1, 1, 1, 1, 1, 0}  \
}

#define O { \
    {0, 0, 0, 1, 1, 0, 0, 0}, \
    {0, 0, 1, 0, 0, 1, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 0, 1, 0, 0, 1, 0, 0}, \
    {0, 0, 0, 1, 1, 0, 0, 0}  \
}

byte col = 0;
byte leds[8][8];

// pin[xx] on led matrix connected to nn on Arduino (-1 is dummy to make array start at pos 1)
int pins[17]= {-1, 5, 4, 3, 2, 14, 15, 16, 17, 13, 12, 11, 10, 9, 8, 7, 6};

// col[xx] of leds = pin yy on led matrix
int cols[8] = {pins[13], pins[3], pins[4], pins[10], pins[06], pins[11], pins[15], pins[16]};

// row[xx] of leds = pin yy on led matrix
int rows[8] = {pins[9], pins[14], pins[8], pins[12], pins[1], pins[7], pins[2], pins[5]};

const int numPatterns = 6;
byte patterns[numPatterns][8][8] = {
  H,E,L,L,O,SPACE
};

int pattern = 0;

void setup() {
  // sets the pins as output
  for (int i = 1; i <= 16; i++) {
    pinMode(pins[i], OUTPUT);
  }

  // set up cols and rows
  for (int i = 1; i <= 8; i++) {
    digitalWrite(cols[i - 1], LOW);
  }

  for (int i = 1; i <= 8; i++) {
    digitalWrite(rows[i - 1], LOW);
  }

  clearLeds();

  // Turn off toggling of pin 11
  FrequencyTimer2::disable();
  // Set refresh rate (interrupt timeout period)
  FrequencyTimer2::setPeriod(2000);
  // Set interrupt routine to be called
  FrequencyTimer2::setOnOverflow(display);

  setPattern(pattern);
}

void loop() {
    pattern = ++pattern % numPatterns;
    slidePattern(pattern, 60);
}

void clearLeds() {
  // Clear display array
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      leds[i][j] = 0;
    }
  }
}

void setPattern(int pattern) {
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      leds[i][j] = patterns[pattern][i][j];
    }
  }
}

void slidePattern(int pattern, int del) {
  for (int l = 0; l < 8; l++) {
    for (int i = 0; i < 7; i++) {
      for (int j = 0; j < 8; j++) {
        leds[j][i] = leds[j][i+1];
      }
    }
    for (int j = 0; j < 8; j++) {
      leds[j][7] = patterns[pattern][j][0 + l];
    }
    delay(del);
  }
}

// Interrupt routine
void display() {
  digitalWrite(cols[col], LOW);  // Turn whole previous column off
  col++;
  if (col == 8) {
    col = 0;
  }
  for (int row = 0; row < 8; row++) {
    if (leds[col][7 - row] == 1) {
      digitalWrite(rows[row], LOW);  // Turn on this led
    }
    else {
      digitalWrite(rows[row], HIGH); // Turn off this led
    }
  }
  digitalWrite(cols[col], HIGH); // Turn whole column on at once (for equal lighting times)
}


here is the error I am getting in arduino 22
I have tried arduino 1.0 as well no dice
yes my frequencytimer2 is installed in libraries for both arduino 22 and 1.0


In file included from C:\Documents and Settings\Administrator\My Documents\Dropbox\arduino-0022\arduino-0022\hardware\arduino\cores\arduino/WProgram.h:6,
                 from sketch_jun18a.cpp:70:
c:/documents and settings/administrator/my documents/dropbox/arduino-0022/arduino-0022/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected unqualified-id before 'double'
c:/documents and settings/administrator/my documents/dropbox/arduino-0022/arduino-0022/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'
c:/documents and settings/administrator/my documents/dropbox/arduino-0022/arduino-0022/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'

any suggestions
thanks
bryan
11  Community / Exhibition / Gallery / Re: Connecting Arduino to Android Phone using Bluetooth on: May 29, 2012, 08:32:13 pm
that link is giving me a 404

I have been playing around with the jy mcu bluetooth module and have had some success. I used this instructable
http://www.instructables.com/id/Androino-Talk-with-an-Arduino-from-your-Android-d/

I had to install the sla4 android and python for android but it works pretty well. As of now I can only receive sensor data from one pin but I havent played around with the code too much to see how I can get data from more pins and send data back to the arduino which is my ultimate goal
as for the amarino project I havent had as much luck with it. I have changed my baud rate and the test event is sending data but I get nothing from my serial monitor. I really want to get this up and running.

12  Using Arduino / Networking, Protocols, and Devices / Re: How to get the JY-MCU bt board to work on: May 28, 2012, 07:51:41 pm
thanks that was it I needed to paste it in at once. knew it was something simple

thanks
bryan
13  Using Arduino / Networking, Protocols, and Devices / Re: How to get the JY-MCU bt board to work on: May 28, 2012, 06:58:23 pm
I am using the modern device usb bub and putty to change the baud rate. using this tutorial http://wiki.openpilot.org/display/Doc/Serial+Bluetooth+Telemetry I have done everything it asked me to do. I can send it the AT command and it sends back OK but when I try and put AT+BAUD7 IT DOESNT WORK. I hit AT and it sends back OK before I can add the plus and baud rate. I know its something simple that I am doing wrong. I have the module working with my android phone at 9600 but I want to use the amarino toolkit and it tells me I need it at a higher rate. Any thoughts?

thanks
bryan
14  Using Arduino / Networking, Protocols, and Devices / Re: strange ethernet shield problem on: February 03, 2011, 12:49:52 pm
Thanks that was it. Seems the reset button on my shield isnt working
15  Using Arduino / Motors, Mechanics, and Power / Re: arduino variable speed fan controller on: February 03, 2011, 12:26:29 pm
Thanks for the advice. Seems i will be going back to my original design
Pages: [1] 2 3