Show Posts
Pages: 1 ... 76 77 [78] 79 80 ... 84
1156  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Push-button - Pressed vs. Held on: July 01, 2008, 04:45:43 pm
I do this quite simply with an nested if statement. You do need another variable to store the state of the input pin. Vaguely:


Code:
if (inputpin == HIGH)
{

  if (buttonstate == 0) {
    do_stuff();
  }

  buttonstate = 1;

} else {
  
  buttonstate = 0;

}

Normally you would put this in the loop() section or someplace else that can poll your inputs. You can see that if the input is high and the buttonstate variable is zero, it will execute the desired function once. Then the button state is set to 1. The next loop around, if the input is still high, buttonstate is still 1, and the desired function won't be executed again. If you loop around and the input is now low, it will set buttonstate to zero. Next time around, if the input goes high again, it will execute the desired function exactly once.
1157  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Jerk Sensor? on: June 17, 2008, 02:04:23 am
Quote
Many people do not like being told what to do.

It did work, though. smiley-grin
1158  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Jerk Sensor? on: June 13, 2008, 11:34:54 pm
Quote
Ben's mention of a spring switch would work. I found one the other day in a cat toy. Whenever you hit the toy with enough force it starts flashing. You can get the toy for about 5 bucks and then just harvest the materials from it. You could even try one of those bouncy balls that light up when you bounce them.

Or, click the link I just posted, and get just the sensor for way less.
1159  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Jerk Sensor? on: June 12, 2008, 12:04:10 am
http://www.goldmine-elec-products.com/prodinfo.asp?number=G16165
1160  Forum 2005-2010 (read only) / Bar Sport / Re: Sparkfun Free Day is Back on: January 13, 2011, 05:52:27 pm
Maybe a consolation prize if you didn't succeed at SparkFun today...I can't give away thousands of dollars but am running a "Free Day" deal until Sunday. You can get free cables with any of the RGB modules, and a free cable/breakout set with the Arduino Centipede Shield.

http://macetech.com/blog/node/108
1161  Forum 2005-2010 (read only) / Bar Sport / Re: ATMEGA328P-AU in stock at Mouser on: December 21, 2010, 08:55:35 pm
Whoa, nice: Mouser now has 11,000 of the TQFP in stock. Way to go!
1162  Forum 2005-2010 (read only) / Bar Sport / ATMEGA328P-AU in stock at Mouser on: December 20, 2010, 08:26:38 pm
Let the hoarding begin.

Over 3000 to 1700 in a few minutes. Mouser has a bunch more coming in the next couple weeks, but after that, who knows? They're quoting 28 week leadtimes now.

Get 'em while you can, I say. Hoarding contributes to the problem, maybe, but those chips will eventually find their way out there.
1163  Forum 2005-2010 (read only) / Bar Sport / Re: Parents on: December 20, 2010, 07:45:02 pm
Quote
we here in katy texas

Katy, huh. Have you ever seen a crappy car driving around, spray painted flat black and a pair of giant fake Gatling guns on the hood? I saw that at a Sonic in Sealy when I was doing some work there a few years ago. Used to go over to Katy Mills all the time and eat at Los Cucos.

I don't think you can complain about your parents making you work for the money you use on your hobby. Probably was that way for 99% of the people here. You've spent most of your life getting instantly bored of whatever they buy you. I agree they could at least help you save some money by using their card and paying them back, instead of losing the fee on the cash cards.

On the other hand, it might mean they have to interact with you more...so they're letting you do your own thing.

I wouldn't say this guy is a troll; because trolls know exactly why and what they're doing. This is just a 13 year old mentality...MakerMann has an excuse at least, while a lot of people we run into here have mental ages of 13 despite their real age.
1164  Forum 2005-2010 (read only) / Bar Sport / Re: Don't Feed The Trolls on: December 20, 2010, 08:05:24 pm
They use all their inner strength to feed us....
1165  Forum 2005-2010 (read only) / Bar Sport / Re: TI is competing with the MCP430 LaunchPad on: June 22, 2010, 05:22:24 pm
They'll sell a lot of these at their gimmick price, to end up in random parts bins.

I just don't like crippled-unless-you-pay development software. It's another thing that Atmel got right.

Ignore Arduino for the moment. You still have AVR Studio, a pretty decent and full featured IDE. Works with a wide range of programming hardware, works with their full range of microcontrollers. Debugger and simulation included. You can write assembly or have it automatically pick up your WinAVR installation and use AVR-GCC with debugging and stepthrough. Free.

If I want a 2K microcontroller...I use an ATTiny24 and AVR Studio. If I want a 256K microcontroller, I use an ATmega2560 and AVR Studio. A lot of the code will run on both devices.

For those who use their own editor and makefiles and GCC, probably because they are on Mac or Linux, the argument begins to fall away. Assuming GCC for MSP430 is good enough and supports new devices quickly, it's almost a wash.

However, TI is late to the party. I'll continue to use AVR and PIC because I'm already familiar with both architectures and TI doesn't have a compelling reason to learn a third.
1166  Forum 2005-2010 (read only) / Bar Sport / Re: Lending Arduinos: How Should I Set It Up? on: November 16, 2010, 06:06:45 pm
Quote
Even an 8yr old kid with some excruciatingly painful disease that has only a month to live.. even then, there is someone worse off.

OK so obviously we wouldn't want Arduinos going to waste because of that, what with the AVR shortage and all...so in cases where the new Arduino owner knows they're about to die, we can have them draw up an Arduino Will to pass the hardware on to some other person.

Joking aside, I don't see any point to lending this stuff out. It's a component, not a tool you use to complete a task like a lawnmower or paint sprayer.
1167  Forum 2005-2010 (read only) / Bar Sport / Re: Closed (ouch) or Open Hardware new Uno's ? on: October 01, 2010, 07:39:59 pm
That's the response I was looking for, thanks Massimo.
1168  Forum 2005-2010 (read only) / Bar Sport / Re: Closed (ouch) or Open Hardware new Uno's ? on: October 01, 2010, 04:09:04 pm
Quote
dcuartielles manifesto

Oh I completely understand the effort required to get something like this done...the long discussions, arguments, realization of approaching deadlines, failures, successes, days when you want to just give up, 36 hours nonstop work, etc.

The only concern most of us have is that the VID/PID thing has added something very proprietary to the mix. Obviously it's hard to get more proprietary than microcontrollers and other chips, but this is a proprietary element that didn't necessarily have to be added.

I realize that the USB-IF has created the majority of this inconvenience but I wish there was another way.
1169  Forum 2005-2010 (read only) / Bar Sport / Re: Closed (ouch) or Open Hardware new Uno's ? on: September 30, 2010, 04:46:04 pm
Quote
They can sell all the chips, they can get their hands on, but they are barred by the USB-IF rules from including the PID unless they are manufacturing the product.

As eight stated earlier, thats the standing of the USB-IF not the Arduino team, the VID/PID can only be used by the manufacturer who is licensed to the original, there is no "subleasing"

Then how can you go onto Microchip's website and apply for a free PID from them, to use with the MCP2200? Are you suggesting that Microchip, a USB-IF member, is blatantly defying a USB-IF directive?
1170  Forum 2005-2010 (read only) / Bar Sport / Re: Closed (ouch) or Open Hardware new Uno's ? on: September 29, 2010, 04:02:41 pm
Oh, for the good old universally available RS232 and LPT ports...why did computer makers ever quit making them, all we really needed was a smaller connector. A lot of chipsets actually still have them, they just aren't enabled in BIOS or wired out to anywhere.

Maybe I'll develop an Arduino that bootloads via punch cards.
Pages: 1 ... 76 77 [78] 79 80 ... 84