Show Posts
Pages: 1 ... 33 34 [35] 36 37 ... 340
511  Using Arduino / Sensors / Re: Temperature & Gas Sensor on: September 02, 2014, 09:06:34 am
In that case you'll need to know from the data sheet or somewhere, what ppm is 0V (analog read value of 0), what ppm is 5V (analog read value of 1023), and what the relationship is in between. If you're lucky it will be linear so if you get a value of say 320 or 870 you can interpolate.

You need to search for the maker's datasheet, and or the data from say Pololu if you use one of their boards.

There are >500k hits on Google for "mq6 arduino code", including this one in the playground.
512  Using Arduino / Sensors / Re: Temperature & Gas Sensor on: September 02, 2014, 08:52:41 am
OK,Thank you.
That it the received limited value ?

Not sure what you mean. The sensor forms one side of a voltage divider as far as I know, so if you put 5V across that, the  output will be from 0 to 5V depending on the sensor's resistance. Have a look at Pololu.com, they have a PCB to mount it on, along with the resistor for the divider.

Arduino analog pins give a value of 0 when the analog input is 0V, and a reading of 1023 at 5V.

You need to know how to convert that value into ppm.
513  Using Arduino / Sensors / Re: Temperature & Gas Sensor on: September 02, 2014, 08:39:24 am
Programming is easy: just an analogRead(x) where x is the pin you connected to.

But that will give you a value from 0 to 1023 (0V to 5V). You will need to see the sensor's datasheet to see how to convert the analog output from the sensor, into a gas concentration. They should give you the relationship between (say) mV and ppm.
514  Using Arduino / Sensors / Re: Temperature & Gas Sensor on: September 02, 2014, 08:25:20 am
As far as I know, those MQ sensors have an analog output on a single line, so you can have 6 on an Uno (A0-A5).
515  Using Arduino / Programming Questions / Re: beginner doubt about variables on: September 02, 2014, 08:19:33 am
Sorry but you lost me totally there.
516  Using Arduino / Programming Questions / Re: beginner doubt about variables on: September 02, 2014, 08:08:12 am
Quote
basically add 1 to va every sec,

It will do it muuuuuuuuuuuuuuuuuuuuuuuuch faster than every second. I don't know how many clock cycles it will take, but it's doing 16 million of them in a second to it will breeze through loop() a zillion times before you can blink.

Why don't you describe what it is you're trying to do?- what are those variables (what do they represent), where do they get their values from (other than each other), what's your actual application?
517  Using Arduino / Programming Questions / Re: Individual servo control using flex sensor readings on: September 02, 2014, 07:12:48 am
Glad it's sorted, so now you can indulge me: you said it's wireless comms between two Arduinoes I think?- yet I see nothing in the code to do with that. Or am I missing something?
518  Using Arduino / Installation & Troubleshooting / Re: reset button on: September 02, 2014, 07:07:05 am
t is an R3, the old one was an R2.

Well, then it must have a reset button as shown previous.

Maybe it's not a genuine Arduino?

But you shouldn't need to do anything with the reset anyway.... sure you got the right com port?
519  Using Arduino / Programming Questions / Re: Motor & LED Control Code Issue on: September 02, 2014, 05:53:15 am
Ah ok, I see what you mean, I hadn't spotted that....

But Paul's equation and yours are arithmetically equivalent, I still hold, and should work just the same if they work at all.
520  Using Arduino / Programming Questions / Re: Motor & LED Control Code Issue on: September 02, 2014, 05:30:32 am

Code:
   if(Time - onTime >= 5000)
would be something my friends could understand without a lot of thought.


That's as may be, but the OP's way is arithmetically equivalent, albeit in a cumbersome way. (Except that the inequality needs an equality option like yours does, just in case it doesn't hit the if in the right (edit.. milli-) second.) edit.... taken that out.... it doesn'yt actually need the =, on second thoughts.
521  Using Arduino / Programming Questions / Re: Individual servo control using flex sensor readings on: September 02, 2014, 04:50:21 am
You've opened a nasty can of worms with having two threads with the exact same question.....
522  Community / Bar Sport / Re: Reality check - when to stop adding features on: September 02, 2014, 04:30:58 am
Creeping featurism is a term synonymous with bad management.


Exactly..... bad project management, especially; the dreaded scope creep.
523  Using Arduino / Project Guidance / Re: How to programme robot arm positions on: September 02, 2014, 03:43:16 am
I can't find the code I had to do something similar. I found an empty .ino file with a promising name so perhaps I didn't save it.

But iirc, what I did was use a 2-axis joystick with a push button. The code for each axis was just knob, doubled up for two pots. I wrote the servo values to eeprom every time I hit the button. Sorry I can't find the code but that may give you some ideas.....

I'll keep looking!

Search the forum btw, there are threads about this.....
524  Using Arduino / General Electronics / Re: 315Mhz transmitter, push button version on: September 02, 2014, 03:02:20 am
Quote
Think, 'something you could market' not "something you built in your basement".

Basements are very uncommon here, but a pal of mine has better machine shop kit in his garage than most pro- shops. He does market stuff he makes in his basement ok garage.... So what the hell does that comment mean?
525  Community / Exhibition / Gallery / Re: Jizzy the quadruped robot on: September 02, 2014, 02:41:58 am
You might want to re-think his name.....
Pages: 1 ... 33 34 [35] 36 37 ... 340