Show Posts
Pages: 1 ... 439 440 [441] 442 443 ... 580
6601  Using Arduino / Programming Questions / Re: Passing Values into a function on: May 01, 2011, 08:58:19 pm
Well for starters as AWOL said look at the menu functions, I can't see why the following wouldn't do the same.
 
Code:
void MenuThree(int OzMenu){
      lcd.setCursor(0, 1);
      lcd.print("Dispense ");
      lcd.print(OzMenu);
      lcd.print(" oz   ");
}

I'm not familiar with the LCD library so the print format may not be exactly right, but that's the idea.

You could also set the cursor to the end of "Dispense " and not print that every time.
6602  Using Arduino / Networking, Protocols, and Devices / Re: A "Minimal" Arduino/XBee/Pachube Sensor Network on: May 01, 2011, 08:51:29 pm
I've already done the node design and PCBs with nodes to do the following

VOLTS - Three analogue inputs that can read up to 30v with 10-bit resolution.
AMPS - This Node uses a two hall affect sensors to measure two separate currents up to ±20A. The contacts are isolated.
TEMP - Measures internal and external temperature in the range -55 to +150°C.
TCOUPLE - Thermocouple interface, 0 to 1000°C.
RELAY/DIGIN - A voltage-free contact pair for controlling lights, small pumps etc. Can switch voltages up to 100v AC or DC, and currents up to 1A with a 33-watt limit. The contacts are isolated. This Node uses a latching relay, therefore the output state persists if the power is cut. A single ESD-protected digital input is also included so this Node can work as an independent Node with local control.
DIGITAL IN - Four digital inputs that can withstand ±25v continuous and up to 15kv ESD.
SHUNT - This Node is designed to read the voltage across a current shunt.
RTC - A real time clock using the DS3234 chip with an onboard TCXO and battery backup.
COUNT - A high-speed counter to measure period, frequency or events. Features adjustable threshold and hysterisis.
PROTO - A prototyping Node with a large pad array for DIP ICs, several breakout areas for SOIC and SOT devices, and a BUSnet interface.

These are basically "proof of concept" designs to cover a few of the most common needs (as perceived by me anyway).

Quote
I have my own time sync happening between the base and remotes,
I'm doing something similar. What resolution does your timing have?

Quote
a scheme to stagger the transmission times (not sure how critical that is, I should take it out and see)
How will you handle clashes?

______
Rob
6603  Using Arduino / Microcontrollers / Re: How to reset Arduino when it hangs on: May 01, 2011, 08:40:28 pm
This will give you a WDT interrupt every ~16mS.

Code:
ISR (WDT_vect) {
 asm ("wdr");  // reset the watchdog
}


void setup () {
  WDTCSR = (1<<WDIE);
}

To stop the interrupt put the asm ("wdr"); in your main loop.

What you do on entering the ISR is another story. You can also set a longer time (up to 8s) and have the WD to reset instead of interrupt.

However I'd be looking into the problem a lot more rather than curing the symptoms.

As mentioned, post the code.
______
Rob
 

6604  Using Arduino / Microcontrollers / Re: Standard For Arduino on: May 01, 2011, 08:31:49 pm
Many board get the SPI signals from the ISP header and I think this is the same on both boards.

______
Rob
6605  Using Arduino / Project Guidance / Re: Need advice: smoothing Pulsein results on: May 01, 2011, 09:38:42 am
Your values have a > 10:1 range, I think that's a bit beyond smoothing. You need to look into the cause of that problem.

What do you get if you print duration before the map()?

______
Rob
 
6606  Using Arduino / Networking, Protocols, and Devices / Re: SPI multi master on: May 01, 2011, 05:39:12 am
Quote
low resolution large sensor array
Then if you can drop to 8-bits that will double the speed or more.

______
Rob
6607  Development / Suggestions for the Arduino Project / Re: New arduino language on: May 01, 2011, 05:04:17 am
The 1284 has to be the best overall chip in the AVR lineup I think, 2x the 2560 RAM, one extra UART which is all most need, gobs of flash and IO.

I'm using it on two boards about to go to PCB fab.

______
Rob
 
6608  Using Arduino / Networking, Protocols, and Devices / Re: Sparkfun as supplier on: May 01, 2011, 04:55:52 am
I've used them 2 or 3 times and been well happy.

______
Rob
6609  Using Arduino / Programming Questions / Re: Arduino & thread on: May 01, 2011, 04:49:06 am
That was on the Old MacDonald variant of that processor wasn't it?

______
Rob
6610  Using Arduino / Sensors / Re: LDR and his scope on: May 01, 2011, 03:06:21 am
You can reduce the reference voltage, see analogReference(), select an external reference and apply a much smaller voltage to the AREF pin.

You can also select the internal 1v1 reference which may be closer to your needs.

______
Rob
6611  Using Arduino / Programming Questions / Re: Arduino & thread on: May 01, 2011, 02:39:30 am
And then there was XPR (eXecute PRogrammer) LDN (LoaD Nothing) and a lot of other funny ones around a few years ago.

______
Rob
6612  Using Arduino / Programming Questions / Re: Arduino & thread on: May 01, 2011, 12:17:35 am
We used QNX for building control on a 6809-based computer in the 80s, I don't remember the details but it's probably fair to say it had 64k RAM.

One assumes though that QNX has gone the bloatware track like everything else.
______
Rob
6613  Using Arduino / Programming Questions / Re: Serial - Preventing significant code/loop slowdown on: April 30, 2011, 10:13:11 pm
I seem to remember on a recent post that there was a bug that screwed with the 300 speed.

______
Rob
6614  Using Arduino / Networking, Protocols, and Devices / Re: SPI multi master on: April 30, 2011, 04:41:35 am
In any multi-master test-then-do arrangement race conditions are a potential issue.

CrossRoads scheme gets around this I think but will cost you some time.

You still haven't said if you can afford to miss a reading or two and if readings from every chip have to be aligned, for example if this is a logic analyser front end you can't miss a single reading, however if you're looking at batteries discharging (OK unlikely given the speeds you've mentioned smiley) it doesn't matter.

Knowing the application might help as well.

______
Rob
6615  Using Arduino / Networking, Protocols, and Devices / Re: Using data from Arduino to toggle pic on: April 30, 2011, 04:24:33 am
Quote
I didn't read your post several times, because I thought it was about communicating with a microprocessor called a "pic"
I haven't read read this before for the same reason, I only read it now because there was bugger all new on the forum smiley

______
Rob
Pages: 1 ... 439 440 [441] 442 443 ... 580