Show Posts
Pages: 1 [2] 3 4
16  Using Arduino / Audio / Re: Audio not playing within new code. on: July 09, 2013, 06:57:39 pm
Hmmm its still giving me some trouble.  smiley-confuse No audio yet. It seems like the code is fine but the program will not "pause" and play"birds.wav"); or any of the others because it only plays the first millisecond or so. Is this a valid hypothesis or am I crazy?

Maybe, but I could be crazy too, and you can't let crazy people decide whether you're crazy or not, can you?

The audio library is designed to run asynchronously, so the code will still execute while the music plays. It should keep playing however, unless you specifically stop the playback.

To "pause' the main loop, you can use


The IR library works fine with my Arduino Mega if the sounds are encoded at 8-11khz. Anything higher causes problems with the playback due to the excessive processing load. I don't have any other type of Arduino to test on at the moment but should work similarly on Uno, Nano, etc.
17  Using Arduino / Audio / Re: WAV File from SD Card on: July 06, 2013, 01:53:33 pm
If the audio comes out like static, the most likely cause is some sort of file corruption on the SD card, or a problem with the file itself. If not, then make sure the wav file is encoded correctly (16khz, 8bit, mono). Also make sure you have the most recent version:
18  Using Arduino / Programming Questions / Re: Setting up interrupts in a library ... problems with attachInterrupt() on: March 25, 2013, 10:00:46 pm
No matter how you look at it, you are pretty much stuck with globals if using interrupts.
19  Using Arduino / Programming Questions / Re: Setting up interrupts in a library ... problems with attachInterrupt() on: March 25, 2013, 07:25:16 pm
It should work in a library, but you need to do it a bit differently in a library when callign the function from an interrupt:

Just like you had it:
attachInterrupt(0, _switchHOME, FALLING);

But change this:

void Easy_Motor::_switchHOME ()

to this:

void _switchHOME ()

and you can declare it outside your class (globally) in Easy_Motor.h
20  Using Arduino / Project Guidance / Re: Quadcopter/ Capstone project on: March 20, 2013, 07:11:28 pm

For the coding, take a look at if you want an example of some solid open-source quadcopter coding for Arduino. Many quality commercial boards run this code, but it will work on a stock Arduino board with some sensor modules as well.

Not sure what you mean exactly by "internet/rc" control, but there are many options for wireless control, so it depends on what you plan to do with it. You can use a standard RC transmitter/receiver or even go totally custom and use a digital tranceiver, so you can communicate directly with other digital devices. (PC, Arduino, etc)
21  Using Arduino / Project Guidance / Re: running bitlash scripts from the arduino on the arduino without serial input on: March 20, 2013, 06:25:23 pm
You may want to take a look at the bitlash API as well:
22  Using Arduino / Project Guidance / Re: multiple software serial inputs on: March 17, 2013, 10:28:46 pm
Since it looks like you only write to the LCD and you only read from the RFID reader, you could use a single software serial port for both of them with TX to LCD and RX from RFID reader.. I think.
23  Using Arduino / Programming Questions / Re: Errors with Timer3 library on: March 16, 2013, 04:04:09 pm
If you are using a rainbowduino board, it is based on Atmega 328 which only has a single 16-bit timer (Timer1).

The Timer3 library is made for boards like the Mega2560 which has four 16-bit timers.

That should compile fine if you choose a Mega board.
24  Using Arduino / Project Guidance / Re: How to decode this on: March 08, 2013, 07:09:06 pm
Hmmm.. I just did a bit of a writeup on decoding digital signals using the Input Capture function on Arduino the other day:

The sketch there could be adapted to decode this type of signal.

25  Using Arduino / Project Guidance / Re: Arduino-powered bike computer on: March 08, 2013, 06:44:38 pm
Uuuhhhhh ... Yup.

Thats why I suggest using an interrupt:

The Arduino will be able to catch very short triggers, and interrupts are about the most reliable way of catching short signals or pulses. Instead of having to check constantly if a pin is HIGH/LOW, the Arduino continually monitors it for you, and interrupts the main loop when the state of the pin changes. This leaves the CPU free to do other things in between signals.
26  Using Arduino / Project Guidance / Re: Arduino-powered bike computer on: March 08, 2013, 06:28:06 pm
Yeah, it can handle counting many thousands of times per second, so handling inputs from sensors on a bike should be no problem, especially if you use interrupts, so it only does work when there is a change of state.

27  Using Arduino / Project Guidance / Re: Arduino-powered bike computer on: March 08, 2013, 06:21:44 pm
Totally possible on one Arduino, and if speed is a concern, just make sure all of your modules support I2c or SPI, and it will handle it.

You can use interrupts for the hall-effect sensors, so the Arduino doesn't have to keep checking the state, and it will handle it easily enough. You woul have install jets on your bike before worry about overrunning its capabilities.

The amount of sensors is limited by what type of sensor etc, so is kind of impossible to give you a max number, but it can handle multiple I2C devices, so you could run the GPS, SD card and LCD all off I2C.

28  Using Arduino / Project Guidance / Re: quadcopter using arduino mega on: March 08, 2013, 06:07:06 pm
You are probably going to want to check out MultiWii:

I also recently documented a very simple Quad based on an Arduino Mega and a few modules:

Basically, you usually want gyro, accellerometer, compass, and barometer sensors which you can get in a single module, then you just need something for wireless control, whether you buy a controller or build one. I used an old XBox controller.
29  Community / Exhibition / Gallery / Re: XBox Controller: Embedded Arduino and RF/Wireless Mod on: December 31, 2012, 05:13:57 pm

So I built a Quadcopter that is controlled with the modded XBox controller.

It uses a custom flight control board built using an Arduino Mega and MultiWii software.

Here is a video showing how its working currently:

At the very end the right motor wire breaks right behind the bullet connector.

More info at my blog, see link above.
30  Using Arduino / Project Guidance / Re: Combining data and serial output question on: November 09, 2012, 05:37:35 pm

SoftwareSerial Library will allow you to use two or more serial devices:
Pages: 1 [2] 3 4