Show Posts
Pages: 1 ... 40 41 [42] 43 44 ... 321
616  Using Arduino / Motors, Mechanics, and Power / Re: Control DC Motor on: August 11, 2014, 12:51:47 am
Should I use interrupt??

No. Why would you: what's interrupting it? You just need time....

You could do it the easy but bad way and use blink or the slightly more complicated but good way and use blink without delay.
617  Using Arduino / Sensors / Re: analogRead on: August 11, 2014, 12:36:46 am
The man page says:

Quote
... values between 0 and 1023. This yields a resolution between readings of: 5 volts / 1024 units ...

... which supports what mart says.

But beware the fence-post error here: it may well be 1024 values, but it's still only 1023 spaces.

For simplicity let's say the values were only 0, 1 and 2. That's 3 values clearly (0, 1, 2), but 3 values have only 2 gaps: the 0-1 gap and the 1-2 gap.

So if 0V is 0 on my pretend 0-1-2  analog sensor scale and 5V is 2, then it's clear that it's 2.5V per gap... position 0 is 0V, position 1 is 2.5V and position 2 is 5V. So the 5V is spread over 2 gaps not 3 positions.

By that logic, where the gaps are what count not the number of values (counting the start and end fence-posts), the 5V is divided over 1023 gaps not 1024 positions.

Edit: my calculator tells me 5/1023 is 0.0048875855327468 and 5/1024 is 0.0048828125, so I'd call those 0.00489 and 0.00488 both of which are 0.0049 so who cares in practice? But yes- it's good to be clear on the theory....

618  Using Arduino / Programming Questions / Re: Combining Codes on: August 10, 2014, 11:42:53 pm
Thanks so much for your help!! I really appreciate the time and effort you put into helping me-thanks!

You're welcome: as it happens I was keen to figure out alarms since I knew my way of doing it was ugly.

Just one thing: please don't quote the whole of a previous post- edit it like I did here just to keep the reader's mental thread, but otherwise it takes up huge screen space and needs loads of scrolling.
619  Using Arduino / Project Guidance / Re: void loop problem on: August 10, 2014, 01:38:12 pm
I'm not sure what you mean when you say you want it to "start from nothing again".
620  Using Arduino / Project Guidance / Re: Final Year Project on Home Security System on: August 10, 2014, 10:09:14 am
i'm open to new suggestions people

There are no doubt aspects of home security that aren't covered (as BL says) so I think you need to do a good search to see what has been done then try to expand on that. I was just browsing Instructables, for instance: why not have a look there. Or browse the security company sites and trade mags and see what services they offer. Do a decent survey of the art, then think what you could do to make those services better... better meaning more feature rich, cheaper, faster, less prone to hacking, etc etc.

Of the top of my head though, I think it's an over traded market and it might be hard to find something a) challenging and b) worthy of a degree.
621  Using Arduino / Project Guidance / Re: Final Year Project on Home Security System on: August 10, 2014, 08:45:53 am
That's a completely trivial hobbyist project, not worthy of an ECE final year project for graduation. Every aspect of that project can be lifted from this site somewhere or other.
622  Using Arduino / Sensors / Re: analog voltage not 0V when digital pin connected to analog pin set to LOW on: August 10, 2014, 07:18:31 am
I guess you copied and pasted pin3's pinMode then....
623  Using Arduino / Sensors / Re: analog voltage not 0V when digital pin connected to analog pin set to LOW on: August 10, 2014, 06:46:14 am
Code?
624  Using Arduino / Project Guidance / Re: Ultasonic sensors on: August 10, 2014, 06:36:22 am
He's pointing out than when you want to test equivalence you need to use == not just =.

Code:
if (sensor ==1){
625  Using Arduino / Sensors / Re: Newbee , need help quickly. on: August 10, 2014, 05:52:00 am
Well you could have an ultrasonic sensor on a gantry pointing down to give the height, but of course not all the bottoms will be the same height above ground.

And to get the width I guess you could have ultrasonic pointing from both sides and a bit of arithmetic will give the width.

Length might be a problem because of the cab in the front.
626  Using Arduino / Motors, Mechanics, and Power / Re: 2 servos - 4 buttons jitter problem on: August 10, 2014, 05:40:45 am
Quote
You get immediate results when playing with an instrument

Now who's talking bull? You try that with bagpipes and you will literally go blue in the face with not a note coming out. A squeak maybe. (Some folk say that a bagpipe squeaks even when played properly.)

I think you missed my point: perhaps I didn't word it properly. What I'm saying is, people try to explain things and do that in a way that is natural to them. On the other hand, folk learn in different ways too. If those two approaches don't fit, that's where the tough shit comes in. It's just bad luck. It's a bunch of folks trying to help, and if the help isn't working, well c'est la vie. It's just the way of it. It's a forum.....

627  Using Arduino / Sensors / Re: Sensors and motor shield. on: August 10, 2014, 05:34:05 am
It looks to me that they only make the A0-5 pins available, those holes bottom right. To use those I think you'll need to get a stick of header pins and solder them in.

Along the top, the row of digital pins, are those pins facing the camera or is that a row of solder pimples? If so they're pretty much useless, even if the shiled isn't using them.

Do you have the maker's documentation?

But all is not lost: remember that the analog pins can be used as digital too, which from what I read, that sensor needs. See note on this page.

628  Using Arduino / Motors, Mechanics, and Power / Re: 2 servos - 4 buttons jitter problem on: August 10, 2014, 05:15:21 am
Quote
but just picking up an instrument and learning it is pretty easy in my opinion.

Let's see you try that with a set of GHBs or a saxophone, both of which my son plays. Not easy at all....

You need to realise that this is a forum populated with guys like you and me. We differ in our approaches to both explaining and understanding. It's not like a paid help-desk where staff have to help; we help where we can and explain the way we do,  and if that's not getting across well frankly that's just tough shit.
629  Using Arduino / Sensors / Re: Sensors and motor shield. on: August 10, 2014, 05:09:08 am
Give details of the shield.

There was a thread recently where the shield had special sockets for sensors. It's unlikely that the shield will have used up all the pins, so there is very likely a way to get at the vacant ones.
630  Using Arduino / Motors, Mechanics, and Power / Re: 2 servos - 4 buttons jitter problem on: August 10, 2014, 04:54:23 am
Quote
You wouldn't expect to learn to play the piano in 2 or 3 hours.

Except in a Dud and Pete sketch.....
Pages: 1 ... 40 41 [42] 43 44 ... 321