|
124
|
Using Arduino / Motors, Mechanics, and Power / Re: Weird motor problem
|
on: December 29, 2012, 06:28:07 pm
|
|
Hello!!!
The reason you'r hearing that noise is because your not giving the motor enough voltage. Due to the fact that your AA batteries probably are not really 1.5v more like 1.2v and because of the voltage drop due to The SN754410 your motors are not getting enough voltage. When you use the 6v your motors are getting plenty of voltage (probably to much). Keep in mind that voltage is not split up between the motors like amperage is. Each one is getting 6v. I would recommend using 3 AA batters. After voltage drop your motors should each get around 3V.
Best of luck, Drew Davis
|
|
|
|
|
127
|
Using Arduino / Project Guidance / PH fish tank
|
on: December 29, 2012, 04:37:15 pm
|
Hello, I'm trying to measure the PH levels of my fish tank. Spark Fun sells a kit (see link below) but I don't know if this would work for my project. I need my Arduino to check the ph level continually and dump a mix into the tank if the ph falls below 10.5. Would this kit work for this application? If so does anybody know where I could look at a sample program like this. The programs they have seem to send the values to the computer which is not what I need. Also, If anybody knows of a different kit that would work better or is cheaper that would be awesome. Thanks!!! https://www.sparkfun.com/products/10972
|
|
|
|
|
129
|
Using Arduino / Programming Questions / Re: PIN HIGH/LOW
|
on: December 26, 2012, 03:31:46 pm
|
|
Like if I type in this: "int value = 225" ... "analogWrite(E2, value); //PWM Speed Control"
Will it keep E2 at 225 if my program moves on from the loop that the latter part of the code is form?
Thanks, Drew
|
|
|
|
|
134
|
Using Arduino / Programming Questions / Re: Stop on black line
|
on: December 22, 2012, 12:35:32 pm
|
Thanks for all of your help. I should have tried the Serial.print from the beginning. The problem was that the lcd left the 0 from 1000 so it made it seem like the light sensor was reading 9900 when it was really 990. I was able to adjust the values and it works now. Thanks, Drew #include <SerialLCD.h> #if ARDUINO < 100 #include <NewSoftSerial.h> //this is a must #else #include <SoftwareSerial.h> #endif
SerialLCD slcd(11,12); int E2 = 5; int M2 = 4; int sensorPin = A1; int long sensorValue = 0; int value = 250; int value2 = 0;
void setup() {
pinMode(M2, OUTPUT); slcd.begin(); }
void loop() { sensorValue = analogRead(sensorPin); while (sensorValue < 1000) { // #1 sensorValue = analogRead(sensorPin); slcd.setCursor(0, 1); slcd.print(sensorValue, DEC); digitalWrite(M2,LOW); analogWrite(E2, value); } while (sensorValue > 1000) { // #2 sensorValue = analogRead(sensorPin); slcd.setCursor(0, 1); slcd.print(sensorValue, DEC); digitalWrite(M2,HIGH); analogWrite(E2, value2); //PWM Speed Control }}
|
|
|
|
|