Show Posts
Pages: [1] 2 3 ... 12
1  Using Arduino / Programming Questions / Re: Sketch help with "If..else" statements and GoBetWino on: December 03, 2012, 09:30:17 pm
The more i think about it the more i need to know more of what you are trying to do and if this is all your code. You can do multiple things at once since they are all checking the same thing..... so you could do this.

Code:
if (1>50 && 2>50 && 3>50 && 4>50 && 5>50)
{
display photo1.jpg;
display photo2.jpg;
display photo3.jpg;
display photo4.jpg;
display photo5.jpg;
display photo6.jpg;
}

But i would advise assigning names to your pins because using the pin numbers gets to be frustration. In any case to get reading you have to call a function that does so.

Code:
const byte sensorOne = 1;  // sensor one is connected to pin one
int sensorOneVal;  // create variable to hold the incoming value

setup(){
pinMode(sensorOne, INPUT); // set pin one as an input
}

loop(){
sensorOneVal = analogRead(sensorOne); // read the value of sensor one and store it to sensorOneVal

  if (sensorOneVal > 50)  // see if the sensor value was above 50
  {
  display photo1.jpg  // display the photo, whatever that means....
  }

}

My advice, if you just read what i put in that code block and have no idea whats happening..... start here and read lots more!
2  Using Arduino / Programming Questions / Re: Sketch help with "If..else" statements and GoBetWino on: December 03, 2012, 09:13:13 pm
If the code works like you hope and the "display" command work as you think it will (very unlikely) it would look like this for each comparison:

Code:
if (1>50 && 2>50 && 3>50 && 4>50 && 5>50)
{
display photo1.jpg;
}

If this is your whole sketch though you are missing some stuff like:

Code:
#includeYourLibraryThatContainsDisplay

setup (){

}

loop () {

}
3  Using Arduino / General Electronics / Re: Best way to get a general electronics education. on: November 26, 2012, 10:18:15 pm
I'm not saying electronics trivial, but you don't need 2 or 3 years of electronics clases before you start having fun or doing useful things.    I think my microprocessor class was a 4th-year university class.   But, I was playing around with electricity and electronics in grade school (in the dark ages before microprocessors were invented).   I started-out with some grade-school science and a couple of "science fair" projects.  (I assume I knew Ohms' Law at the point, but I really don't remember when I learned Ohm's Law...) Then I built a couple of kits.  Maybe I was in Jr. high by the time I got a soldering iron and built my 1st kit.    I took an Electronics class when I was in my 2nd year of high school, and sometime during high school I started building stuff "from scratch".   

Agreed. I don't have any college and i like to think i know a bit. Might not be able to recite formula's like i would if i had to cram them for a exam but i know where to find them and can usually put pieces together to make fun stuff happen.

Find a project that uses the components you want to concentrate on learning at this point. Then get reading... followed by building. Fun times.
4  Using Arduino / Project Guidance / Re: Arduino + Motor Shield. Old guy needs help. on: October 13, 2012, 08:03:30 pm
@GoofBallTech: Exactly what library are you using?? )

I just googled the motor shield he was using and saw an entry on adafruit. It brought me here so i used that as the example code.

http://www.ladyada.net/make/mshield/use.html
5  Using Arduino / Motors, Mechanics, and Power / Re: Arduino strange behavior with dc motors on: October 13, 2012, 04:38:42 pm
How do you have the ground tied together? If the ground from the 9V battery is tied to ground of the AA batteries then it would work ok for that. Once you connect USB to the board and power is then supplied from the PC it may not be enough to keep them properly referenced.

This answer is also given from my understanding of your issue... perhaps a wiring diagram would help for me to better understand question if i did not interpret properly.
6  Using Arduino / Project Guidance / Re: Arduino + Motor Shield. Old guy needs help. on: October 13, 2012, 03:36:44 pm
To the point of speed, this would be one, of many possible, ways to do it.

In this (untested) code your pot being in the center would stop motion. Go left and the motor goes one direction. Go right and the motor goes the other direction. The more you come from the center position the faster the motor will go.

Code:
// 10 bit input ranges 0 to 1023
// 8 bit output ranges 0 to 255
potVal = analogRead(potPin); // read the value from the potentiometer into potVal

if ( potVal > 520) {               // if pot is turned to the right
  motor.setSpeed(map(potVal, 520, 1023, 0, 255));  // make the speed proportional to the amount of turn on the pot
  motor.run(FORWARD); // set motor to move "forward"
}

else if (potVal < 504) {                // if pot is turned to the left
  motor.setSpeed(map(potVal, 0, 504, 0, 255));  // make the speed proportional to the amount of turn of the pot
  motor.run(BACKWARD);  // set motor to move "backward"
}

else {  // pot value must be between 504 and 520 which is our deadband
  motor.run(RELEASE); // stop motor
}
7  Using Arduino / Project Guidance / Re: Make Own RC Boat Radio on: October 10, 2012, 09:54:33 pm
I would say start small. Build projects that utilize the parts you will one day use in your boat.

Once you know each piece well enough to use them in small groups and get the software working with multiple items at the same time.... then try to ball then all up and stick them in a hull.

Crawl around a bit before you jump off a pier :-)

It sounds like a very good final goal though. Something to work toward always helps keep you moving.
8  Using Arduino / Project Guidance / Re: Arduino + Motor Shield. Old guy needs help. on: October 10, 2012, 09:49:50 pm
Which motor shield you have?
9  Using Arduino / Project Guidance / Re: Question about Controlling Solenoids with Relays!! on: October 08, 2012, 08:29:02 am
Coil Specifications
36.9mA @ 24VDC
Min. Operating Voltage - 80% of the rated coil voltage (24 * .8 = 19vdc minimum voltage to coil)

You cannot drive this coil directly from your arduino in any case.

the rating for the above mentioned 2N3904 is 200ma (if memory serves) so it would drive this relay fine.

Don't forget to research what resistor you need between the Arduino and the base of the transistor to avoid an over current situation on the output pin when driving the transistor.
10  Using Arduino / Project Guidance / Re: Question about Controlling Solenoids with Relays!! on: October 07, 2012, 10:50:34 pm
More importantly this appears to be a 24 volt coil relay?

Good catch, i looked right over that little bit of really important info.
11  Using Arduino / Project Guidance / Re: Question about Controlling Solenoids with Relays!! on: October 07, 2012, 09:22:41 pm
I don't see anything in that link for the current the coil pulls.

A good items to use might be some 2N3904 transistors though. They are pretty cheap and easy to come by. Lots of examples on here about how to use them to control relays.
12  Development / Other Hardware Development / Re: Arduino Pin Duplicator on: October 06, 2012, 11:41:42 pm
I agree on the female header. Make it something like this motor shield....



but that does look pretty cool.......
13  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1H for Windows (installer, drivers, etc) +SRC on: October 06, 2012, 11:18:15 pm
Think there would be a way to invert colors? Editor background = #000000?

Edit - Nevermind, i have discovered theme.txt.

Veryyy niiiicee! Sexy black theme to go with all the new features.
14  Using Arduino / Project Guidance / Re: Code for Panning/Tilting on: October 06, 2012, 04:41:08 pm
Pan and tilting refer to the way the servo is mounted, nothing in software that's special.

You would do well to read:

http://www.arduino.cc/playground/Learning/SingleServoExample

http://www.instructables.com/id/Remote-Controlled-Pan-and-Tilt-Head/

https://www.sparkfun.com/products/10335
15  Using Arduino / Motors, Mechanics, and Power / Re: Need help to assemble my dc motor to my arduino w/ relay switch on: October 06, 2012, 04:18:10 pm
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html
Pages: [1] 2 3 ... 12