Show Posts
Pages: 1 ... 22 23 [24] 25 26 ... 33
346  Using Arduino / Programming Questions / Re: floppy BLDC on: December 22, 2011, 03:07:15 pm
the website i linked before said to put a 1mhz clock on this pin, am i even doing the right thing toggleing LOW/HIGH?

hmmm thats strange, before with no delays and new code it wouldnt turn, now it does but very slowly but its smooth...
347  Using Arduino / Programming Questions / Re: floppy BLDC on: December 22, 2011, 01:30:41 pm
ok so i have clock on pin 9 and using the old digitalwrite code it works, but if i use this:

Code:
int DlY=10;
void setup()
{               
  DDRB=11111111;   //sets 8-13 as output   
}

void loop()
{
  PORTB = B11111111; //sets 8-13 as high
  delay(DlY);
  PORTB = B00000000; //sets 8-13 as low
  delay(DlY);
}

it doesn't...how long does it take for a normal digitalwrite? ive confirmed that the pin is actually cycling.
348  Using Arduino / Programming Questions / floppy BLDC on: December 22, 2011, 12:47:39 pm
i have a floppy motor and driver like: http://sturntech.com/blog/2010/12/04/reverseengineering-fd1231h-floppy-disk-spindlemotor-controller/

i figured out that if i loop LOW then HIGH with no delays on the CLK pin with the arduino(vcc etc hooked up too), it will turn the motor. but its really laggy, how can i speed up the LOW/High switching of the digital pin and thus make the motor spin "better"?
349  Using Arduino / Project Guidance / quadcopter quick transmitter question. on: November 21, 2011, 07:23:54 pm
this is my plan so far for a Arduino based quadcopter:
FRAME: MikroKopter 500mm frame - $72.95
   http://www.nghobbies.com/cart/index.php?main_page=product_info&products_id=249
BRAIN: ATMEGA 644p
   serial.1: Xbee--- http://www.sparkfun.com/products/10421
   serial.2:
   4 PWM for BLDC motors
   SENSOR STICK: 9DOF board from sparkfun---ADXL345 accelerometer, HMC5883L magnetometer, ITG-3200 gyro
      http://www.sparkfun.com/products/10724      
Lippo alarm---http://static.rcgroups.net/forums/attachments/2/4/5/6/4/a210702-220-MicroScream1.jpg
BATTERY: Zippy FlightMax 3s 5000mAH 25c
   http://www.hobbyking.com/hobbycity/store/uh_viewitem.asp?idproduct=8583
BATTERY CHARGER: Turnigy Accucel-6 50W 5A Balancer/Charger - $33.99
   http://www.hobbyking.com/hobbycity/store/uh_viewItem.asp?idProduct=7028
ESC: Turnigy Plush 25amp Speed Controller x 4 - $49.92 @ $12.48 a piece
   http://www.hobbyking.com/hobbycity/store/uh_viewItem.asp?idProduct=2163
PROPS: APC 10x4.7 propellers set - $8.50 a set
   http://www.quadroufo.com/product_info.php?products_id=63&osCsid=b06516dc35619309b9fe3e6cd8e13471
MOTORS: Turnigy 2217 20turn 860kv 22A Outrunner x 4 - $56.16 @ $14.04 a piece
   http://www.hobbyking.com/hobbycity/store/uh_viewItem.asp?idProduct=5691

$73  FRAME
$10    ATMEGA 644p
$80  Xbee x2
$100 9DOF sensors    
$5   Lippo alarm
$33  Zippy FlightMax 3s 5000mAH 25c
$34  Turnigy Accucel-6 50W 5A Balancer/Charger
$50  ESC: Turnigy Plush 25amp Speed Controller
$9   PROPS: APC 10x4.7 propellers set - $8.50 a set
$56  MOTORS: Turnigy 2217 20turn 860kv 22A

TOTAL: $450



my main question is: what is the best way to send/receive info with the quad to another Arduino for control? should i use the xbee i linked to above? and i would need two of them: one for the quad, and one for the "control station"?

thanks
350  Using Arduino / Project Guidance / Re: Floppy drive music (almost finished but...) on: November 20, 2011, 09:48:02 pm
i made something very similair: a arduino hooks up to some of the floppy pins and pulses them accordingly with instructions from a .mid file java interpreter app.

http://dduino.blogspot.com/2011/10/moppy-playing-music-with-floppy-drives.html
351  Using Arduino / Project Guidance / Re: What to do next after finishing a starter kit? on: November 20, 2011, 09:43:32 pm
i know the basics mostly(i think? smiley-grin). mainly im somewhere, reading something or thinking randomly, and i think "ooooh i could do... with a Arduino and have fun project!" then i set out attempting it, and research if i dont know.
352  Community / Website and Forum / Re: {Now Uploaded} Getting Started, Learning, Reference + FAQ PDF! on: November 20, 2011, 09:37:38 pm
no problem. glad someone found a use for it... i thought no one noticed...

for any admin who reads this; should my pdf be put in place of the 2 year old pdf in the playground?
353  Using Arduino / Interfacing w/ Software on the Computer / Re: serial port already in use on: November 19, 2011, 01:36:07 pm
im guessing from what you say, that the Arduino IDE was still using the serial port. if you try to upload a sketch and it fails, wait until it gives an error in the Arduino IDE before trying again.

windows issue fix all: Restart!
354  Using Arduino / Interfacing w/ Software on the Computer / Re: C# for loop code --change two values at once each "loop" on: November 19, 2011, 11:36:13 am
Dang it! i always way overthink these issues...just simple subtraction...grrr

i see what you mean paulS, anything i can do to fix?
355  Using Arduino / Interfacing w/ Software on the Computer / C# for loop code --change two values at once each "loop" on: November 19, 2011, 03:29:24 am
i have this code:
Code:
if (JoyData[4] == 1)
                {
                    Trigger.Checked = false;
                }
                else
                {
                    Trigger.Checked = true;
                }

                if (JoyData[5] == 1)
                {
                    Middle.Checked = false;
                }
                else
                {
                    Middle.Checked = true;
                }

                if (JoyData[6] == 1)
                {
                    Lower.Checked = false;
                }
                else
                {
                    Lower.Checked = true;
                }

                if (JoyData[7] == 1)
                {
                    Base.Checked = false;
                }
                else
                {
                    Base.Checked = true;
                }

it checks joydata array "places" 4->7 if they are true or false(it is backwards, 0 is enabled, 1 is open), and sets a "radioButton" checkbox accordingly on a C# form. joydata 4->7 array values are read from 4 buttons connected to a Arduino.

i figured it would make sense to put it in a for loop:
Code:
for (int v = 4; v < 8; ++x)
                {
                    if (JoyData[v] == 1)
                    {
                        Trigger.Checked = false;
                    }
                    else
                    {
                        Trigger.Checked = true;
                    }
                }
that was easy for checking the array values 4->7, but i need to check other buttons as i check the array values. array value 4 is trigger, array value 5 is middle...i need those to change along with "v" in the for loop. i thought of using a string array:
Code:
string[] BtnName = new string[]{"Trigger","Middle","Lower","Base"};
but im not sure how to "sync" the btnName array with the 4->7 joydata array values in the for loop.

thanks smiley
356  Using Arduino / Interfacing w/ Software on the Computer / Re: serial port already in use on: November 19, 2011, 03:19:01 am
restart computer? maybe you have another sketch open that has serial monitor open?
you didn't give much info.
357  Using Arduino / Project Guidance / Re: USB IR Toy with Arduino on: November 19, 2011, 02:07:05 am
com'on look at the scheme smiley
see:

give the board some power(usb or whatever right?), and then connect the IRRX pin to a digital pin on your Arduino. then you can use that to receive 38khz signals with the Arduino. the IRTX pin is for sending codes, so you can also hook that up to a Arduino digital pin, and send codes with that.

or just hook up +5v/Gnd pins on the  board to Arduino board and power it that way.

more info on IR for arduino:
http://dduino.blogspot.com/2011/11/use-sonar-to-control-tv.html
http://www.zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/
http://luckylarry.co.uk/arduino-projects/arduino-redefining-the-tv-remote/
http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
http://www.fabiobiondi.com/blog/2009/11/control-your-arduino-using-an-infrared-remote-and-the-ik38khz-sensor/
http://sheepdogguides.com/arduino/ar3ne1ir.htm
358  Using Arduino / Project Guidance / Re: Smallest CPU supported by Arduino IDE on: November 19, 2011, 01:50:50 am
in PDIP package i think atinny85(or 45) is the best choice.
 and heres how to set it up: http://hlt.media.mit.edu/?p=1229

more info: http://toasterbotics.blogspot.com/2011/08/using-arduino-with-attinys.html
http://toasterbotics.blogspot.com/2011/08/programming-attiny85-arduino-style.html
359  Using Arduino / Programming Questions / Re: what does this line of code do? on: November 17, 2011, 08:00:59 pm
gotcha thanks
360  Using Arduino / Programming Questions / what does this line of code do? on: November 17, 2011, 07:55:17 pm
Code:
  val = analogRead(potPin);
  amp = (val >= 512) ? val - 512 : 512 - val;
the first one reads the analog pin, obviously, but what does the second line do?

mainly what is:
Code:
? val - 512 : 512 - val

thanks
Pages: 1 ... 22 23 [24] 25 26 ... 33