Show Posts
Pages: 1 [2] 3 4 ... 6
16  Using Arduino / Programming Questions / Re: Error when writing to arduino using the WebServer ethernet example. on: October 21, 2011, 06:17:18 pm
They look just like mine. Since you are getting different results, perhaps it's time to reveal what board type you are compiling for.

Arduino Diecimila
17  Using Arduino / Programming Questions / Re: Error when writing to arduino using the WebServer ethernet example. on: October 21, 2011, 03:29:43 pm
I get:
Quote
Binary sketch size: 450 bytes (of a 30720 byte maximum)
So, there is something wrong with one of the libraries that you downloaded.

Post your SPI.h and Ethernet.h files, for comparison.

Ethernet.h: http://pastebin.com/sCiRRSa3
SPI.h: http://pastebin.com/MX3ZfVPa
18  Using Arduino / Programming Questions / Re: Error when writing to arduino using the WebServer ethernet example. on: October 21, 2011, 03:04:35 pm
Quote
Even this won't compile :S
I'm pretty sure you saw something more than "Nope, not going to compile that!".

Yes, of course sorry was a littlebit quick there:

http://pastebin.com/WXeGxUd9

Thats the errors I'm geting using this code:

Code:
#include <SPI.h>
#include <Ethernet.h>

void setup()
{

}

void loop()
{
 
}
19  Using Arduino / Programming Questions / Re: Error when writing to arduino using the WebServer ethernet example. on: October 21, 2011, 02:53:11 pm
Quote
Loaded the example from the Arduino 022, and just pushed Upload. Didn't do any changes to the code at all.
Did you select a board type? Is it the right one? What OS are you on?

Too much information is better than too little. Fee free to volunteer more than you think we need to know.

Windows 7 x64
Arduino 022 just downloaded.
Did select the correct board type, just tried the blink example and it works fine =)

EDIT:

Even this won't compile :S

Code:
#include <SPI.h>
#include <Ethernet.h>

void setup()
{

}

void loop()
{
 
}
20  Using Arduino / Programming Questions / Re: Error when writing to arduino using the WebServer ethernet example. on: October 21, 2011, 02:47:19 pm
Your errors may depend on your code and the IDE you are using.

Loaded the example from the Arduino 022, and just pushed Upload. Didn't do any changes to the code at all.
Seems to be something with the Ethernet library, it won't compile any examples at all :S
21  Using Arduino / Programming Questions / Error when writing to arduino using the WebServer ethernet example. on: October 21, 2011, 01:45:46 pm
Can't figure out why it gives me this long list of errors:

Code:
In file included from E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:14,
                 from E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:10:
E:\Programming\Arduino\Arduino\libraries\Spi/SPI.h:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SPIClass'
E:\Programming\Arduino\Arduino\libraries\Spi/SPI.h:53: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SPI'
E:\Programming\Arduino\Arduino\libraries\Spi/SPI.h:55: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Spi/SPI.h:62: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Spi/SPI.h:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
In file included from E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:10:
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:18: error: redefinition of typedef 'SOCKET'
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/types.h:137: error: previous declaration of 'SOCKET' was here
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:49: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SnMR'
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:87: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SnIR'
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:96: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SnSR'
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:115: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'IPPROTO'
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:129: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'W5100Class'
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:323: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'W5100'
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:325: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:329: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:333: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:337: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:341: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:345: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:349: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:353: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:357: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:361: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:365: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:369: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:373: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:377: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c: In function 'socket':
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:31: error: 'Sn_MR_TCP' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:31: error: (Each undeclared identifier is reported only once
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:31: error: for each function it appears in.)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:31: error: 'Sn_MR_UDP' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:31: error: 'Sn_MR_IPRAW' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:31: error: 'Sn_MR_MACRAW' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:31: error: 'Sn_MR_PPPOE' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:43: error: 'Sn_CR_OPEN' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c: In function 'close':
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:71: error: 'Sn_CR_CLOSE' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c: In function 'listen':
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:101: error: 'SOCK_INIT' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:103: error: 'Sn_CR_LISTEN' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c: In function 'connect':
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:155: error: 'Sn_CR_CONNECT' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c: In function 'disconnect':
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:175: error: 'Sn_CR_DISCON' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c: In function 'send':
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:209: error: 'SOCK_ESTABLISHED' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:209: error: 'SOCK_CLOSE_WAIT' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:221: error: 'Sn_CR_SEND' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:232: error: 'Sn_IR_SEND_OK' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:236: error: 'SOCK_CLOSED' undeclared (first use in this function)

Any ideas?
22  Using Arduino / Motors, Mechanics, and Power / Re: Arduino Duemilanove with two servos, chopps. on: October 11, 2011, 10:44:54 am
Ah, thanks guys! So to cut it short, a easy way to solve this is to power the servos on a individual battery-bank and let the arduino use its own battery =)

Or did I miss something?
23  Using Arduino / Motors, Mechanics, and Power / Arduino Duemilanove with two servos, chopps. on: October 10, 2011, 10:00:06 am
So, I've took my Arduino Duemilanove from the shelf again, and tought I was gonna try a little half-finnished robot that was laying around.

Lets cut to the problem, I've hooked up two servos, small 9g ones. And trying to control both servos at the same time. One servo is attached to pin 2 and the other one on pin 11.

It seems to be some kind of interference runing them both, cause if I take out pin 2 or 11, the other servo runs fine. If I insert it again they both start behaving choppy and strange.

Heres my code:
Code:
// Controlling a servo position using a potentiometer (variable resistor)
// by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>

#include <Servo.h>
 
Servo servo_turn;  
Servo servo_move;  
 

 
void setup()
{
  servo_turn.attach(2);  
  servo_move.attach(11);
}
 
void loop()
{
 
  Center();
  Forward();
  delay(1000);
  Left();
  delay(2000);
  Center();
  delay(500);
  Right();
  delay(1500);
  
  
  
 
}

void Forward()
{
  servo_move.write(10);
}

void Right()
{
  servo_turn.write(76);
}
void Center()
{
  servo_turn.write(87);
}
void Left()
{
  servo_turn.write(100);
}


So, why won't they run smoothly when they both are plugged in?
24  Forum 2005-2010 (read only) / Troubleshooting / Re: Syntax isn't color coded on: April 27, 2009, 06:18:30 am
Sorry, problem fixed now.

Seems like there was some error in the Arduino folder itself, replaced with a new download. All working now. I should have thought of this in the first place smiley-razz

But since all configuration files are in my documents it's not something that came to mind at first smiley-razz
25  Forum 2005-2010 (read only) / Syntax & Programs / Re: NewSoftSerial + MegaServo = bad? on: November 14, 2009, 06:23:45 pm
Oh, thanks!

I'm guessing the MegaServo library also does.
26  Forum 2005-2010 (read only) / Syntax & Programs / NewSoftSerial + MegaServo = bad? on: November 12, 2009, 10:17:59 am
I'm having some problems, and it seems like every time I'm sending data to my lcd with newsoftserial, servos get a twitch. I'm just wondering if some timers are used by both libaries?
27  Forum 2005-2010 (read only) / Syntax & Programs / Switch case problems on: November 15, 2008, 02:59:09 pm
Code:
 switch (Selectverdi)
     {
       case > 100 && < 200:
       digitalWrite(pins[12], HIGH);
       digitalWrite(pins[11,10,9,8,7,6,5,4,3,2,1], LOW);
       Mode = 1;
       break;
      
       case > 200 && < 300:
       digitalWrite(pins[11], HIGH);
       digitalWrite(pins[12,10,9,8,7,6,5,4,3,2,1], LOW);
       Mode = 2;
       break;
       default:
       break;
     }

How can I do that?
To make it check if the case is between 100 & 200 ?
28  Forum 2005-2010 (read only) / Development / 8-bit, 8000 Hz audio playback on a PC speaker. on: August 02, 2009, 05:12:19 pm
http://www.arduino.cc/playground/Code/PCMAudio

Anyone know howto make my own wav files into sounddata?

I know it's listed up a link in the example, but I only got a bunch of un-compiled files. And I sure do not know howto use them.

Anyone?
29  Forum 2005-2010 (read only) / Troubleshooting / Re: Strange readings from analog pins using potmeter on: September 04, 2010, 05:52:02 am
HAHA!

My god, how can I be so stupid smiley-razz

I blame the in-activity lately, it's like 5 months since I last used my arduino boards.

thanks!

Works fine now smiley-razz
30  Forum 2005-2010 (read only) / Troubleshooting / Strange readings from analog pins using potmeter on: September 04, 2010, 04:58:45 am
Hi

I've just took out my arduino boards again, and I tought I should start with just the easy Knob tutorial to refresh my arduino skills smiley-razz

Anyhow, I've noticed the servo didn't respond like it should. So I put
a serial.print on the reading just to see the value. And it's stuck around 250-300, no matter how I adjust the pot.

So first I changed to another 10k potmeter, same there. Then tried another arduino board. Same there. Also tried changing to another analog pin, but same thing there...

Then I tried the good old Arduino Diecemila(or how its written). Then it read the values perfectly!

Why wont my Picos, Nanos, Boarduino, BareBonesBoard show the correct value from 0-1023 when adjusting the pot? And only the old
diecemila. It's very strange, and I'm very confused right now ....

Cause I wanted the Modified Pico or some other board like the Boarduino to control some servos.

Only the good old arduino diecemila. Thats strange.

I use 5+ and GND for the outer pins, then the center pin I got on analog2.

Picture of the simple wiering on a Modified Pico



Uploaded with ImageShack.us

White is center pin, red & black are gnd and 5v
Pages: 1 [2] 3 4 ... 6