Loading...
  Show Posts
Pages: [1] 2 3
1  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.
2  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:
Code:
attachInterrupt(0, _switchHOME, FALLING);

But change this:

Code:
void Easy_Motor::_switchHOME ()

to this:

Code:
void _switchHOME ()

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

For the coding, take a look at MultiWii.com 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)
4  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:

https://github.com/billroy/bitlash/wiki/api
5  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.
6  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.
7  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:

http://tmrh20.blogspot.com/2013/02/digital-data-encoding-manchester.html


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

8  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:  http://arduino.cc/en/Reference/AttachInterrupt

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.
9  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.

10  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.

11  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:

http://www.multiwii.com/
http://www.multiwii.com/connecting-elements

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

http://tmrh20.blogspot.com/2013/01/quadcopter-current-summary-docs-and.html


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.
12  Community / Exhibition / Gallery / Re: XBox Controller: Embedded Arduino and RF/Wireless Mod on: December 31, 2012, 05:13:57 pm
Update:

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.
13  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: http://www.arduino.cc/en/Reference/SoftwareSerial
14  Community / Exhibition / Gallery / Re: XBox Controller: Embedded Arduino and RF/Wireless Mod on: October 29, 2012, 02:06:50 pm

Thanks!

I knew about the USB connection, and was initially looking at the possibility of using a USB host shield to read the data from the controller, but couldn't seem to find any examples or info on whether the Orig. Xbox controllers are supported. The general size of the shields and the extra cost involved were also a factor. 360 controllers seem to be supported, but I'm still unsure about these, so if somebody could clarify, please feel free.
15  Community / Exhibition / Gallery / XBox Controller: Embedded Arduino and RF/Wireless Mod on: October 28, 2012, 04:02:40 am
I have always enjoyed taking apart electronics to salvage components and see what makes em tick, and this is a little mod that let me dig into the guts of a relatively straight-forward device: an XBox controller. I have a bunch of old controllers around, along with some Arduino Nano boards, so decided to join another together with an RF module in order to control various devices wirelessly.  The controller basically consists of a bunch of potentiometers and buttons arranged in an easy-to-operate kind of way, so this build is fairly simple in theory. As such, the wiring is fairly straight forward, there are just a lot of wires to connect to make use all of the inputs. I chose an APC220 radio module due to its ease of use (UART/TTL), range (1Km), and the fact that it allows communication with computers and Arduino based devices. The settings (frequency, data rate, etc) can also be changed on the fly, so it is fairly versatile. Any Arduino compatible RF module could be used in its place. I believe this would work similarly with a 360 controller, but haven't taken one apart... yet.

Before:                 During:                 After:


Details and pictures at http://tmrh20.blogspot.com/2012/10/original-box-controller-arduino-based.html
Pages: [1] 2 3