Show Posts
Pages: [1] 2 3
1  Using Arduino / Programming Questions / Re: How to use servo library without disabling PWM pins 9 & 10? on: March 30, 2013, 05:00:45 pm
I managed to get it to work, thanks for all the help. For anyone in the future that needs the library, I compiled it into a zip file with all the modifications and created an example sketch that should work (at least for me it does).

(I personally hate it when people fix a problem and don't include a final fix), Enjoy...

Dm.

Instructions:
- Unzip folder and place into "libraries" folder of arduino.
2  Using Arduino / Programming Questions / Re: How to use servo library without disabling PWM pins 9 & 10? on: March 30, 2013, 04:24:34 pm
Try putting this in the .h file
Code:
#include <Arduino.h>

It then gives me the following error:

Code:
C:\Program Files\Arduino\libraries\ServoTimer2\ServoTimer2.cpp:24:26: error: WConstants.h: No such file or directory

It fixed this by deleting: " #include "WConstants.h" in the .cpp file. It seems to compile now, but i'll let you know if it works.
3  Using Arduino / Programming Questions / Re: How to use servo library without disabling PWM pins 9 & 10? on: March 30, 2013, 03:56:29 pm
Copy the .cpp and .h files from the link I gave or follow the link on this page http://www.creative-robotics.com/?q=protoshield1
Put them in a folder called ServoTimer2 in the libraries folder where your sketches are saved.  Don't forget to shut down and restart the IDE to make the library available.

It doesn't seem to compile (same as the files from previous links), giving me the following error:

Code:

In file included from sketch_mar30a.ino:1:
C:\Program Files\Arduino\libraries\ServoTimer2/ServoTimer2.h:71: error: 'byte' does not name a type
C:\Program Files\Arduino\libraries\ServoTimer2/ServoTimer2.h:72: error: 'byte' does not name a type
C:\Program Files\Arduino\libraries\ServoTimer2/ServoTimer2.h:86: error: 'boolean' does not name a type
C:\Program Files\Arduino\libraries\ServoTimer2/ServoTimer2.h:106: error: 'boolean' does not name a type


Edit:
- This is from the following code, btw:

#include <ServoTimer2.h>

void setup() {}

void loop() {}

It would also help if there were any examples, thanks.
4  Using Arduino / Programming Questions / Re: How to use servo library without disabling PWM pins 9 & 10? on: March 30, 2013, 03:32:24 pm
Or maybe use the ServoTimer2 library http://arduino.cc/forum/index.php/topic,21975.0.html and lose PWM on pins 3 &11 instead of 9 & 10 if that helps.

I actually just found that and it would work out perfectly, but I'm still unable to find the download link.
5  Using Arduino / Programming Questions / How to use servo library without disabling PWM pins 9 & 10? on: March 30, 2013, 02:47:35 pm
I have an Arduino Uno, pololu VHN 5019 Motor driver (linked below) and I'm trying to drive a single servo in addition to the 2 motors driven by the motor controller. The problem is that the motor controller uses pins 9 & 10 and can't be remapped according to the user manual.

Links:
- Motor Controller: www.pololu.com/catalog/product/2502
- Library: https://github.com/pololu/Dual-VNH5019-Motor-Shield
- User Manual: www.pololu.com/docs/0J49
- Arduino Servo Library: arduino.cc/en/Reference/Servo (states pins 9 & 10 are disabled when in use)

My only option is to figure out how to use the servo without the standard library from what I understand? Does anyone have suggestions programmatically how to solve this problem? I tried detaching the servo immediately after moving it, but the motors continue to not work.

Any help would be appreciated, DM.
6  Using Arduino / Programming Questions / Re: my first arduino robot on: March 12, 2013, 12:52:55 pm
put all your code in the "Code" tags (Edit your post, highlight the posted code and press the "#" button near the text formatting buttons). It might also help make it readable if you format the code with indentations.

DM.
7  Using Arduino / Programming Questions / Re: Error in serial communication on: March 12, 2013, 12:51:01 pm
What type of motor controller if any do you use? How often do you need to send the control signal to change or maintain speed?
8  Using Arduino / Programming Questions / Xbee Interference on: March 12, 2013, 12:48:40 pm
I have a wireless link using 2 Xbee Series 1 modules connecting my laptop (Processing) to an arduino mega. At the same time, I'm using 2 wireless cameras that run at 2.4 ghz with its own wireless receiver. I was originally under the impression that the Xbee protocol handles its own error checking (even with the same frequency near by).

I wanted to know if anyone can recommend software setting changes to both Xbee's as well as physical modifications to the antenna that may help reduce the interference.

Additional information:
- The program works perfectly without the cameras plugged in.
- When the cameras are plugged in, the program seems to miss some data or have it delayed.
- When the cameras are disconnected from power, the program resumes running perfectly.
- The baudrate is 115200
9  Using Arduino / Programming Questions / Re: Xbee Series 1 Programming on: March 12, 2013, 12:38:29 pm
I found that the problem was in fact with the Jayconsystems Xbee Shield as a manufacturer defect. I contacted them and they were nice enough to send a fresh one.

If I just hooked up the RX/TX/Vin/GND straight to the board I would've found this out sooner. Thanks for all the help.
10  Using Arduino / Programming Questions / Re: Xbee Series 1 Programming on: March 03, 2013, 04:00:50 am
I forgot to mention, I also tried with a 100ms and 500ms delay after posting that. I had a feeling that would be the next response.

Code:
void loop() {
Serial.println("Test");
delay(500);
}
11  Using Arduino / Programming Questions / Re: Xbee Series 1 Programming Tutorials? on: March 02, 2013, 06:57:49 pm
I followed the video posted by: "deathrow": http://www.youtube.com/watch?feature=player_embedded&v=vKVNmA8C6m8. It seems I programmed the Xbees successfully using Putty. In XCTU, Xbee never responded with an "OK" when sending commands, whereas in Putty it did.

The good news is that it worked, but the bad news is that it only worked for a short amount of time and then continued to spew out random ASCII garbage. I had a solid few seconds of the exact data coming up in the serial monitor and then it stopped and I wasn't able to replicate it. I used the code below

Code:
void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println("Test");
}

What i'm using:

I'm also testing it on my Arduino Mega and Arduino Uno.

Thanks for any help or insight, DM.


--
Edit: And yes, the serial monitor is set to 9600.
12  Using Arduino / Programming Questions / Re: Xbee Series 1 Programming Tutorials? on: March 01, 2013, 01:04:34 pm
I'll check the firmware shortly when I get home, but it should be the newest one. I clicked download and update.

I changed the xbee settings by going to "Modem Configuration", clicking "Read", then changing the PANID so both have the same one. Then MY and DL values are reversed on each xbee. I then press Write to store the configuration

I then test my Arduino Mega by plugging it into a 9v Walwart connected to nothing with just the JS xbee shield on it. I then connect the USB explorer to my laptop and open the Arduino serial monitor- setting it to 9600 and I get gibberish. I also tried this in XCTU terminal with similar results
13  Using Arduino / Programming Questions / Re: Xbee Series 1 Programming Tutorials? on: March 01, 2013, 07:32:32 am
I'm still unable to both Xbees to properly communicate with each other. I programmed my Arduino to just use "Serial.begin(9600)" in setup and "Serial.println("test")" in loop. Then I'm trying to receive that message on my PC.

Can anyone be more specific or helpful with suggestions rather than letting me know that yours works perfectly and implying I'm an idiot?

I set the baudrate on both Xbees to 9600. One strange thing is that entering "+++" in the terminal gives me "OK" as a response, but other commands seen in tutorials get no response. I've been changing the settings in "Modem Configuration" using XCTU. Which Function Set do I use? Should one be "USB adapter"? I've tried different settings for a few hours.

PS: on my settings, my Arduino shield lights up when I send it data, so It appears to have some type of link.
14  Using Arduino / Programming Questions / Re: Xbee Series 1 Programming Tutorials? on: February 25, 2013, 08:21:52 am
Great to know smiley-razz
15  Using Arduino / Programming Questions / Re: Xbee Series 1 Programming Tutorials? on: February 25, 2013, 08:18:52 am
Your response was only helpful without the first sentence. Thanks for the response, though.

I've googled it, looked up instructables and as I mentioned in my original question if you spent time actualy reading it is that I only found 'helpful' tutorials on series 2 xbee.
Pages: [1] 2 3