Show Posts
Pages: [1] 2 3 ... 35
1  Forum 2005-2010 (read only) / Troubleshooting / Re: Tut's on basic c for arduino? on: December 13, 2007, 05:03:33 pm
... now it works lol

wait does that mean you know c code? r u good at it, cuz i got a **** load of q's!
2  Forum 2005-2010 (read only) / Troubleshooting / Re: Tut's on basic c for arduino? on: December 13, 2007, 04:16:31 pm
i read the tut's page, and its really good, but it's also confusing, and some tutorials dont give a finished code, they give a code that your sapposed to finish, and i dont know how to becuase i suck at c, i dont know what they want me to add, even if they say what to add!

lets take for example the piezo tone maker, what the hell is that about?! i put it on my ardiuno program and tried to uplaod, but it had a bagillion syntax errors, am i missing something, why isint it just going to the arduino and working?
3  Forum 2005-2010 (read only) / Troubleshooting / Tut's on basic c for arduino? on: December 13, 2007, 03:34:36 pm
can any really expiereinced programmer make tutorials on how to code please? i know a few really (really ) good coders around here and ladyada's site and i think you guys should make tutorials, i mean sure information can be recieved from the refrence page, but to understand how to do one thing, i have 6 tabs on firefox open, looking for it on forums, and everywhere!!! it annoys me. If any expierenced coder thinks they are up for it, please speak up, many many people would be thankfull, becuase coding may be easy fro some, but i am having a very tough time trying to do stuff with my arduino becuase i cant code for my life, and using the arduino for anything, is only limited to me becuase of my lack of coding knowledge! I want to make really cool stuff, but the lack of coding knowledge is holding me back!

it would be a good idea to have a coder to have a whole separate topic on this site called "coding tutorials"and he should do very simple, to very hard tutorials which are stickied, and have other topics for people to aski qeustions, or maybe take allot of suggestions, and incorporate those into your tut's. Better yet, i can setup a very simple website which the coder can have, and use for tutorials pourposes ( it will probably be a .co.nr instead of a .com, but who cares? )

if i'm just rambling, and theres tutorials already, please share smiley
thanks
-big93
4  Forum 2005-2010 (read only) / Troubleshooting / Re: processing forum sucks, please help! on: January 03, 2008, 09:37:07 pm
OH!!!!
i need to send the arduino 2 sketches! one on arduino program, and one on processing, now it makes sense why it wouldent work...

edit, here i got it working. On the software interface page, it gives a quick sketch and i edited it a bit to make it finally work, and heres the result:

Code:
import processing.serial.*;
import cc.arduino.*;

Arduino arduino;
int ledPin = 12bb;

void setup()
{
  //println(Arduino.list());
  arduino = new Arduino(this, Arduino.list()[1], 57600);
  arduino.pinMode(ledPin, Arduino.OUTPUT);
}

void draw()
{

  if(keyPressed) {
    if (key == 'b' || key == 'B') {
      arduino.digitalWrite(ledPin, Arduino.HIGH);
    }
  } else {
    arduino.digitalWrite(ledPin, Arduino.LOW);
  }
  rect(25, 25, 50, 50);
}


and then i programmed glovepie (with a code thats shorter then my name lol ) and now when i press A on my wiimote, and led lights up on the arduino!
IT WORKED!!!
awsome, thanks for the help, i wouldent have been able to do it without your help, and now i could move onto more complex things, i could even make a wiimote controlled robot
thanks again!
-big93
5  Forum 2005-2010 (read only) / Troubleshooting / Re: processing forum sucks, please help! on: January 03, 2008, 07:24:35 pm
but i cant even make a succesful sketch to make an led turn on the baord, i dont know what barebones code i need to write!
and how do i tell it my port is com 3?
and what do i use instead of "digitalWrite" and instead of "pinMode"
and instead of "HIGH" and instead of "OUTPUT" becuase for all those things it sais it's not located in some temporary folder on my comp...

i'm also trying to edit your code to work with, but its not working either, are those port. commands neccasery, or do i just get rid of them?

thnks for the quick reply btw!!
6  Forum 2005-2010 (read only) / Troubleshooting / processing forum sucks, please help! on: January 03, 2008, 06:19:27 pm
hi, i tried posting for help on the processing forum, but nobody is answering!
processing looks cool, and i just want to be able to use it!

so if somebody could show me the barebones of what i need in my coding screen, and  include anything the processing program needs to connect to the arduino, becuase im having problems.

please include

begining, void setup, void draw or loop, whichever i need, and if you need an actual script to use, im tryng to make it so when i press b on my keyboard, the arduino understands and turns an led on, and the led is on pin 13.

thanks to anybody who helps me!
happy new years!
-big93
7  Forum 2005-2010 (read only) / Troubleshooting / Re: code not working, please help! on: December 17, 2007, 07:35:05 pm
those look like good books, and i also solved the primary expression things by adding the " }{ " things, lol, thanks!

-big93
8  Forum 2005-2010 (read only) / Troubleshooting / Re: code not working, please help! on: December 16, 2007, 02:38:31 pm
oh! thats why, i forgot you have to do two equals if ur not using a greater or less then with it... lol

thanks mem
9  Forum 2005-2010 (read only) / Troubleshooting / Re: code not working, please help! on: December 16, 2007, 11:48:34 am
....... damnit, code not working again, can you take a look again, i really dont understand why it's acting funny.

ok, i made it so modes are now controlling individual leds, but when i try to dimm and brighten the led in one mode, all the leds brighten and dimm....

Code:
int value = 0;                          
int ledpin3 = 11;
int ledpin2 = 10;
int ledpin1 = 9;                          
int pot = 0;
int pot1= 0;
int mode = 0;
void setup()
{
  Serial.begin(9600);
  
  
}

void loop()
{
if (pot1 < 1023)
  mode = 3;
if (pot1 < 682)
  mode = 2;
if (pot1 < 341)
  mode = 1;
 pot1 = analogRead(1);
 pot = analogRead(2) / 4;  
 Serial.println(mode);
  if (mode = 3)
   analogWrite(ledpin3, pot);
   else
   analogWrite(ledpin3, 0);
  if (mode = 2)
   analogWrite(ledpin2, pot);
   else
   analogWrite(ledpin2, 0);
  if (mode = 1)
   analogWrite(ledpin1, pot);
   else
   analogWrite(ledpin1, 0);
  
  

  
}

thanks again
-big93

p.s, why does it ask me for a primary expression before the freaken "else" statement sometimes?
10  Forum 2005-2010 (read only) / Troubleshooting / Re: code not working, please help! on: December 16, 2007, 11:12:27 am
thank you, ill test the better code now, and what you said about the bug, is not true, i put thiose on cuz i thought they go there, but now i know!!

thanks allot!
11  Forum 2005-2010 (read only) / Troubleshooting / code not working, please help! on: December 16, 2007, 02:18:39 am
rawr, i'm trying to use if statements, and its not working, i looked at my code and it seems to make sense!

i'm using a potentiometer and dividing the total number by 3 to make 3 equal parts of 341, and making 341 mode 1, 682 mode 2 and 1023 mode 3.

but when i tell it to print in mode, it always stays at mode 3!

i used less than , and then i used less than or equal to for 1023, now please tell me why mode is stuck on 3!

p.s, i cant get the else code to work after the if statement, it tells me i need a primary expression before it, and it doesent say what primary expression to use!! w/e for now, heres the messed up code :

Code:
int value = 0;                          
int ledpin = 9;                          
int pot = 0;
int pot1= 0;
int mode = 0;
void setup()
{
  Serial.begin(9600);
  
  
}

void loop()
{
  if (pot1 < 341);
   mode = 1;


  if (pot1 < 682);
   mode = 2;


  if (pot <= 1023);
   mode = 3;

 
 pot1 = analogRead(1);
 pot = analogRead(2) / 4;  
 Serial.println(pot1);
  analogWrite(ledpin, pot);

  
}


please tell me why my code is broken, it doesent make sense to me!

thanks in advance,
-big93
12  Forum 2005-2010 (read only) / Troubleshooting / Re: inbetween statement? on: December 16, 2007, 05:54:35 pm
YES!

succesfull code!

thanks a bunch
13  Forum 2005-2010 (read only) / Troubleshooting / Re: inbetween statement? on: December 16, 2007, 03:44:21 pm
thank you for the quick reply smiley
14  Forum 2005-2010 (read only) / Troubleshooting / inbetween statement? on: December 16, 2007, 03:36:33 pm
hi smiley

i want to use a joystick to control 4 leds ( or 5 ) but i want one of my statements to be an "in between" statement, like for example:

"if that number is in between 500 and 550, then do this!"  is there such a statement?
thnks
-big93
15  Forum 2005-2010 (read only) / Troubleshooting / Re: potentiometer's to control awsomness! on: December 16, 2007, 02:39:47 pm
aha, thats what it is, ok i see it, ill look at it and try to copy the code into mine, thanks!
Pages: [1] 2 3 ... 35