Show Posts
Pages: 1 ... 382 383 [384] 385 386 ... 600
5746  Using Arduino / Programming Questions / Re: Problem with TimeNTP from Time library on: May 05, 2012, 01:42:23 pm
write is defined in print.h as size_t. When I change virtual void UdpBytewiseClass::write(uint8_t) to virtual size_t UdpBytewiseClass::write(uint8_t) this error goes away. But I'm really confused why I get this error in a library that's apparently been around since 2008.
I've got UdPBytewyse.h from https://bitbucket.org/bjoern/arduino_osc/src/tip/libraries/Ethernet/

2008 libraries would be written for pre-1.0 Arduino.  Part of the 1.0 release was having more things inherit behaviors from Print and Stream.  That's why the 2008 code doesn't always work with 2012 libraries.  Might be time to re-write the Time library to work with the 1.0  Ethernet UDP client.  Or maybe just use the existing example:

Files->Examples->Ethernet->UdpNtpClient

5747  Community / Bar Sport / Re: To all you SciFi aficionados. I need your help on: May 05, 2012, 01:19:35 pm
Perhaps a library near you has a copy.  http://www.worldcat.org/title/antibodies/oclc/19655576
5748  Using Arduino / Programming Questions / Re: Does the built in Watchdog work on: May 05, 2012, 01:11:53 pm
Seems to be fixed. Very good to know. Do you know if the bootloader is fixed or what happened?

My understanding of the problem is:

a) The WDT reset does NOT disable the WDT.  This means that if the bootloader doesn't explicitly disable WDT and the bootloader takes longer than the WDT interval to get to your setup() function the WDT will cause a reset loop.

b) The newer bootloaders detect the cause of a reset and either look for a download (Reset line pulled low) or go straight to your sketch (Power-on).  If they treat the WDT reset as a Reset-line reset they would exacerbate issue 'a'.

I'm not sure if/when the bootloaders were changed but the 1.0 UNO bootloader works fine with a 1/4 second WDT.
5749  Using Arduino / Project Guidance / Re: Arduino WiFi websocket to ...ipad? on: May 05, 2012, 12:03:40 pm
I think that what will work easiest is to have the Arduino act as a web server, serving up HTML5 pages and initiating an ad-hoc WiFi network.  The iPad could then connect to the ad-hoc WiFi network and fetch pages from the Arduino.
5750  Using Arduino / Project Guidance / Re: Investigating project feasibilty - a question on shields on: May 05, 2012, 11:57:09 am
In general a 'shield' is designed to plug into the Arduino's headers and can be pulled off as needed.  If you build your shield with stacking headers (male on the bottom, female on the top) you can stack shields as long as there are no pin conflicts.
5751  Using Arduino / Project Guidance / Re: Using RFID ICs on: May 05, 2012, 11:53:33 am
At a minimum I would expect the RFID Reader chips to require an antenna in addition to power and ground.

You would probably be better off buying an RFID Reader rather than a bare chip.

http://www.trossenrobotics.com/c/usb-serial-rfid-readers-tags-kits.aspx

http://www.sparkfun.com/categories/144
5752  Using Arduino / Programming Questions / Re: Does the built in Watchdog work on: May 05, 2012, 11:41:20 am
Works fine with my Arduino UNO R2.

Code:
//  Watchdog Timer Example
#include <avr/wdt.h>

unsigned long ToggleDelay;  //  When this delay grows to longer than the WDT interval the WDT resets the Arduino

const int LEDpin = 13;

void toggle_led()
{
  digitalWrite(LEDpin, !digitalRead(LEDpin));
}

void setup()
{
  wdt_disable();
  ToggleDelay = 1;   // Start with a very short delay
  pinMode(LEDpin, OUTPUT);
  wdt_enable(WDTO_250MS);  // Set watchdog to 1/4 second
}

void loop()
{
  wdt_reset();
  toggle_led();   // Blinking goes slower and slower until the WDT causes reset, then starts over.
  delay(ToggleDelay);
  ToggleDelay += 5;   // Increase the delay by 5 milliseconds.
}
5753  Using Arduino / General Electronics / Re: Arduino MEGA2560 USB parts identification on: May 05, 2012, 11:29:48 am
Without looking at the circuit, I'll stick my neck out and say that looks like 22 ohms in "resistor network '2D'".

On the schematic it looks like there are five resistor networks:
RN1: Quad 10k (one is unused)
RN2: Quad 22 Ohms (two are unused)
RN3: Quad 1k (one is unused)
RN4: Quad 1k
RN5: Quad 10k (one is unused)
5754  Using Arduino / Programming Questions / Re: Mapping and Global Variables on: May 04, 2012, 05:50:18 pm
To get the new value of the analog input you have to do another analogRead().  You set sensorA0 (et al) at initialization time and never set it again.


Note: 'int' is plenty long for an analogRead() (10 bits value).  Using 'long' is a waste of space and time.

Time values should be 'unsigned long', not just 'long'.
5755  Using Arduino / Programming Questions / Re: Example code not working (wire.write and wire.read) on: May 04, 2012, 09:11:52 am
Perhaps you have an old copy of the Wire library somewhere.  "As of Arduino 1.0, the library inherits from the Stream functions, making it consistent with other read/write libraries. Because of this, send() and receive() have been replaced with read() and write()."

Check the "libraries" folder in your sketch folder to make sure you don't have an old Wire library.
5756  Using Arduino / Programming Questions / Re: Example code not working (wire.write and wire.read) on: May 04, 2012, 09:00:52 am
Perhaps that code was written for an earlier version of Arduino.  There were a number of changes in 1.0, probably including changes in the Wire library.
5757  Using Arduino / Sensors / Re: current transducer. on: May 04, 2012, 08:17:19 am
can i just use the output from it (2.5 to 4.5v) without any other circuitry straight into an analog input?

Yes.

In the spec sheet it quotes Rl  (load resistance) should be greater than 2k should there be a 2k resistor to ground?

No.  The input impedance of the Arduino is >2K so you should be able to connect the output directly to it.  Just hook "5V" to +5V, "0V" to Ground, and "OUT" to an analog input pin.
5758  Using Arduino / General Electronics / Re: Arduino MEGA2560 USB parts identification on: May 04, 2012, 08:06:04 am
The PDF version of the schematic shows:

Z1 and Z2 are CG0603MLC-05E.  Google shows those to be Bourns ChipGuard MLC-series ESD protectors (varistor).

F1 is MF-MSMF050-5.  Google says that's a Bourns PTC Resettable Fuse.

L1 is a BLM21 which is a 2012 size surface mount inductor.  The schematic doesn't specify a value.  Perhaps the design files do.
5759  Using Arduino / General Electronics / Re: Current Consumption in Ardunio Mega on: May 04, 2012, 07:32:55 am
Yes but I would expect that it takes 60mA no matter how you power it.

I think I understand.  At 5V it would be drawing 60 mA (0.3 Watts). at 10V it would be drawing 60 mA (0.6 Watts) and at 12V it would be drawing 60 mA (0.72 Watts).  Same current, more wattage.  With the additional wattage being dissipated as heat in the regulator?
5760  Using Arduino / Microcontrollers / Re: Bootloader for Pro-Mini - Atmega328 3.3V 16MHz on: May 04, 2012, 07:22:24 am
Then why would they say it can't run at that speed at that voltage?

They know from testing that some of their parts will fail under those conditions.  They want to be able to tell people who run under those conditions that they clearly state in the datasheet that you should NOT try to run under those conditions.  "You cannot expect to hold us responsible for systems failure when you run the processor outside the specified parameters."
Pages: 1 ... 382 383 [384] 385 386 ... 600