Show Posts
Pages: 1 2 [3] 4 5 ... 26
31  Using Arduino / General Electronics / Robot Electrical Question on: June 06, 2013, 05:04:53 pm
Hi,

I am wiring my robot, and I was wondering what I should go with for a power source. It needs two inputs: 12v and 7.2v dc. The 7.2v goes to a Vex PIC microcontroller, and the 12v goes to a wireless router. I have a 7.2v 3000mAh Vex NiMH battery and a 12v 7Ah sealed lead acid (Heavy.) I would rather use only one battery, and I would prefer the 7.2v.

Is it possible to have a circuit that makes the 7.2v go to 12v just for the router? My dad had the idea of converting the 7.2v to 7.2v ac, running it in to a transformer to get 12v ac, and then using a bridge rectifier. I'm sure it isn't that efficient though.

Sorry if this post isn't super clear.
32  Using Arduino / General Electronics / Re: Reset Button on: June 06, 2013, 04:49:23 pm
So a button between ground and reset should reset it; got it. Thanks.
33  Using Arduino / General Electronics / Reset Button on: June 06, 2013, 04:19:26 pm
Hi,

I was wondering how you would hook up a button to the reset pin. I don't know if it is the same, or if you have to have a special circuit.

Thanks.
34  Topics / Robotics / Re: Autonomous tennis ball shooter on: May 18, 2013, 11:18:30 pm
The code shouldn't be that hard, you just have to remember to wire the limit switch correctly. http://arduino.cc/en/tutorial/button

Code:
#include <Servo.h> // We will use the servo library, because I have heard it works better with motor controllers like the Victor/Jaguar/Talon
Servo controller;

const int limitSwitch=3; // Digital pin for limit switch
const int motorPin=10; // Make sure this is a PWM pin

const int motorOnValue=180; // The value that will turn the motor on
const int motorOffValue=90; // The value that will turn the motor off

// Stuff for debounce:
int current;
int buttonState;
int lastButtonState=LOW;
long lastDebounceTime=0;
long debounceDelay=500; // Milliseconds

void setup(){
controller.attach(motorPin);
}

void loop(){
current=digitalRead(limitSwitch);
if(current!=lastButtonState){
lastDebounceTime=millis();
}

if((millis()-lastDebounceTime)>debounceDelay){
if(current!=buttonState){
buttonState=current;
if(buttonState==HIGH){
controller.write(motorOnValue); // Turn the motor on
}else{
controller.write(motorOffValue); // Turn the motor off
}
}
}
}
35  Using Arduino / Motors, Mechanics, and Power / Re: Talon Speed Controller on: April 14, 2013, 05:38:02 pm
Arn't these controllers just PWM?
36  Using Arduino / Motors, Mechanics, and Power / Re: Talon Speed Controller on: April 14, 2013, 04:42:13 pm
Thanks for confirming that the Talon and the Jaguar controllers work with Arduino. I kind of figured they would, as well as Victors.
37  Using Arduino / Programming Questions / Re: Arcade Drive on: March 23, 2013, 09:50:47 pm
I think I can get it working with this code: http://www.robotc.net/forums/viewtopic.php?f=33&t=823

I would just have to modify the values a bit.
38  Using Arduino / Programming Questions / Arcade Drive on: March 23, 2013, 08:58:50 pm
Hi. I need help writing an Arcade drive control. My input device would be my iPod, and I have it set up with the gyro. That part works, and it sends out 0-180 on each axis. X goes from 0 (left) to 180 (right), and y goes from 0 (tilted back) and 180 (tilted away). I have two Vex motors that go from 0-180. 0 is backwards, 180 is forwards.

Hopefully this will be enough info. I have searched Google a bit, and I didn't find very much useful, but I did find this: http://www.vexforum.com/wiki/Term_-_Arcade_Style_Drive but that didn't help me.
39  Using Arduino / Programming Questions / Re: Read from one character in string to another on: March 15, 2013, 08:59:44 pm
Quote
but wouldn't that make var = 1023; instead of 1023?
int var = 27;
What is the value in var? 27 or 27;?

If you said 27;, you were wrong.

Ok, I was just curious because I have never used atoi before.
40  Using Arduino / Programming Questions / Re: Read from one character in string to another on: March 15, 2013, 07:47:21 pm
Awesome! Thank you. I don't know anything about atoi, but wouldn't that make var = 1023; instead of 1023?
41  Using Arduino / Programming Questions / Read from one character in string to another on: March 15, 2013, 07:12:02 pm
Hello everyone,

I have a string of data in one of my Arduino programs, and I need to break it apart. The string will hold things like:
M1:1023;
M2:25;

or other things like that. I am wondering how I can great only things that are between : and ; so for M1, I would get 1023 saved to a variable. For M2, 25 would be saved to that variable.

----

I was watching a video on Youtube about I2C, and Jeremy did, what he used things like data_length(); and data.substring(); except that was in Processing.
42  Using Arduino / Motors, Mechanics, and Power / Re: HiTechnic Motor Controller on: March 15, 2013, 06:54:57 pm
Reading the spec sheet for the controller, the range for the speed goes from -100 to 100. 45H and 47H are power for each motor. So here is how I think I would write the code:

Code:
#include <Wire.h>

byte speed = 100;

void setup()
{
  Wire.begin(); // join i2c bus
}

void loop()
{
  Wire.beginTransmission(0x02); // transmit to device #44 (0x2c)
                              // device address is specified in datasheet
  Wire.write(speed);             // sends value byte 
  Wire.endTransmission();     // stop transmitting
  delay(500);
}

That should send 100 to address 0x02 every half second, but how does it know to set motor one to 100? Do I have to send a string of data?
43  Using Arduino / Motors, Mechanics, and Power / Re: HiTechnic Motor Controller on: March 14, 2013, 06:07:51 pm
So for the code, I know I need to use the Wire library for I2C communications. Basically, I would be sending motor 1, or address 02, a value for the motor speed, right? I know in Labview for FTC, the motor values go from 0-255, so I don't know if they are the same here or not.

And also, how would I wire it to my Arduino? I was thinking of just stripping the wires, or using this breakout: https://store.wayneandlayne.com/products/bricktronics-breakout-board.html

Basically, I don't know exactly how to approach this project, but I have ideas how.
'
Edit: I found a website with how the wires are layed out in the connector. http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=136
I have an Uno R1 & R3, so SDA goes to A4, and SCL goes to A5, correct? And of course, 5V to 5V, and GND to GND.

Also found another picture with what the 6th lead is, and color codes:
44  Using Arduino / Motors, Mechanics, and Power / Re: Tetrix Motor Controller on: March 12, 2013, 11:41:48 pm
Whoops, meant to say HiTechnic DC Motor Controller. http://www.legoeducation.us/eng/product/hitechnic_dc_motor_controller/1648

Edit: I think I found a PDF that would be useful: http://www.legoeducation.us/etc/supportFiles/TETRIX/739413/HiTechnicMotorControllerBriefv1.3.pdf
45  Using Arduino / Motors, Mechanics, and Power / HiTechnic Motor Controller on: March 12, 2013, 11:24:49 pm
Hello. I was wondering if it would be possible to have one or many HiTechnic Motor Controllers interfaced with Arduino. They are I2C, but I don't know anything about that. I am using UNO R3.
Pages: 1 2 [3] 4 5 ... 26