Show Posts
Pages: 1 2 [3] 4 5 ... 192
31  Using Arduino / Programming Questions / Re: Displaying a Keypad on Touch Screen on: May 24, 2014, 10:40:25 pm
There is a keypad sampleUTouch  sketch that works well Too..

32  Using Arduino / Microcontrollers / Re: Arduino Uno + IO Expander shield on: May 13, 2014, 12:07:45 am
Does the I/O expander have a name and model or part number or where you bought it...
Little basic questions. Might you do us and yourself a favor and read this first? Please?
We All know what it says...
You didn't bother to read simple instructions that are written to help YOU in answering YOUR questions...
While it is obvious that your primary language isn't english that doesn't explain your refusal to try to understand the basics of asking for help on a subject that you've done little to understand yourself.
Therefore the answers you get might or might not be of any help..

33  Using Arduino / Programming Questions / Re: ds18b20-9bit? on: May 10, 2014, 02:54:23 pm
Cool link, The OW slave looks  really promising... Wonder what it would take to use it with an 433 OOK Pair.... Make for great monitoring for ambient in various area's about the house or barn.??

34  Using Arduino / Microcontrollers / Re: Does 1.5.6-r2 work with USBtinyISP? on: May 09, 2014, 10:22:19 am
Although I own a couple of the asp programmers... I built the Adafruit ISP programmer and I did 2 mods.. the first was to rewire the zif socket for the 43 - 2313 and 85 chips and the second was to wire the ISP connector to the SPI pins except the reset which must go to pin 10 for the reset to be under control of the Adfruit ISP sketch. I also use the AT - PA programming board which has both 6 and 10 pin programmer connections. This way using a dedicated Uno I can program virtually any Atmel chip that is supported by the IDE. I've not used it with a Mega 1284 or 2560 though. The AT - PA also has provisions for a 328 and a crystal or a resonator...
It has worked very well for me for over 6 month's... for the rest I bought a MK II programmer.

I own a Digix and see no reason to even attempt using it as a programmer... Uno's are cheap enough that this method made more sense to me... Point of fact.. I used my genuine r3 for the dedicated programmer...
35  Using Arduino / Microcontrollers / Re: Does 1.5.6-r2 work with USBtinyISP? on: May 06, 2014, 10:03:41 pm
Did you install the tiny cores in 1.56 r2? 1.05 and 1.56 are two different IDE's...

36  Using Arduino / Programming Questions / Re: Efficent code writting on: May 05, 2014, 10:12:40 pm
You could use millis()... the blink without delay sketch is the other hint.. and get the answer from DofunctionA

37  Using Arduino / General Electronics / Re: [Help on searchig] IC for switching ON \ OFF on: May 05, 2014, 09:38:28 pm
What controls the switch? and for that matter why ? a plain toggle switch could be used. If it must be an electric control what is the voltage and current available from the "Control" pin.

38  Using Arduino / General Electronics / Re: [Help on searchig] IC for switching ON \ OFF on: May 05, 2014, 07:18:14 pm
The missing requirement is Switch What?. Without that information your question is "Undefined"

39  Using Arduino / Programming Questions / Re: How to monitor variables not using the serial? on: May 03, 2014, 08:02:40 am
Still looks like a neat terminal program though...

40  Using Arduino / Microcontrollers / Re: Length between two Arduinos communicating w/ each other on: May 03, 2014, 07:20:05 am
Neither I2C or SPI will work well over that distance W/O special extra hardware... But RS232 or RS422 or RS485 are better methods as they have design features built in that are better suited for long lines... For that range IR, Optical comms might be a better example/choice.

41  Using Arduino / Programming Questions / Re: C++ inline vs. method on: May 03, 2014, 06:58:27 am
Speaking as a non skilled beginning programmer with a Basic language background and some time with '51 and PIC assembler...
Personally a Goto is a bone left over from the dark ages of C programming... When K&R were the new guys on the block This was I feel a sop to the languages that did support such nonsense and I feel strongly that justifying the use of obfuscating code that easily generates more, similar code is just that or a clever method of emphasizing the true value of Goto... Why not the two examples presented. Although I don't pretend to even "Yet" understand the Template 'method' or the other fine example which is as comprehensible as as the Template class?, I've written many lines of basic code starting with GW basic (Gee Whiz... It Works?") and both Goto and Gosub are hacks on good coding structure... I use "Globals" only when the code requires that global access to system variables mainly time or other accumulated data is required for proper evaluation of code continuity... In every other case after 20 years of writing working but CRAP code... I am personally very happy that the prevalent methodology frowns on starting spaghetti code practices... This I had to discover myself by rewriting previously written code to include new functions... It's like writing functions in 8051 assembler with multiple entry, exit points... a simple change lines later can make  the code all but unusable unless the entry/exit holes are filled... This was the way I had to learn 51 assembler... We had a "Programmer" to write some controller code for an irrigation clock and he insisted that his code was perfect and that the '51 cores were the best hardware available... even though it took 12 clock cycles to accomplish.
My feelings are that If a programmer not real proficient at his vocation is hired to write code and requires what are unnecessary jumps (Goto) to code that doesn't have a fixed return path to begin with he isn't competent... just an opportunist hack... the hardest thing I do is to try to layout a flow chart or a state diagram before I begin to write the title block. This is an Expert method to create unplanned code... coders that write good code by "the seat of their pants" are experts with an intimate knowledge of the intricacies of the chosen language... The rest are merely accidents looking for a place to happen.
There is purpose to structure and the Goto is the antithesis of good structured programming..
For the record I am a 67 year old hardware engineer learning a most complex language... From two points...
One is the dearth of specific books for embedded coding and the second one is the time I must spend to learn C/C++ code practices that I'll never use because I only develop embedded projects...
Leaving out the differences between C99 and C11 as they refer to the 'Unusual Arduino Dialect' embedded controller paradigm and the parts dumbed down so junior can learn bad coding practices... Strings are a no brainer... Garbage collection in 2K of sram is an unattainable joke... Even if an allocatesd scratchpad approach is applied to a memory area reserved properly for that kind of foolishness it will fail... sooner or later.
I appreciate that I am making a large statement about an area of which I am still very much not qualified to speak to..
Goto's are like mildew in code, once started they are difficult to eradicate and frequently reasons for many failures... If only because of the lack of an exception handler to deal with the unintended consequences of going out of C and into the rough...
<end of inexperienced rant>...

42  Using Arduino / Programming Questions / Re: Thermistor Readings on: May 02, 2014, 03:04:12 am
Yes for the thermistor on the Anderson page as I wrote in my last post..
in case you missed it..
copied here...
// LIN_THERM - Arduino
// Continually measures temperature using linearized thermistor.
// copyright, Peter H Anderson, Oct 1, '10

unsigned int ad_meas(byte channel, byte num);
void display_temperature(int T);

void setup()

void loop()
    unsigned long Rtherm;
    unsigned int adval, R_therm, R_therm_10;
    int T_10;
        adval = ad_meas(0, 32);
        R_therm = ((unsigned long) 2200) * adval / (1024 - adval);
        if (R_therm > 3700)
            T_10 = 9999;   // out of range
        else if (R_therm > 1830)
            T_10 = (R_therm * 10 - 37970) / -39;
        else if (R_therm > 827)
            T_10 = (R_therm * 10 - 33600) / -31;
        else if (R_therm > 570)
            T_10 = (R_therm * 10 - 22780) / -17;
            T_10 = 9999;  // out of range

unsigned int ad_meas(byte channel, byte num)
   unsigned int sum = 0, adval;
   byte n;
   for (n=0; n<num; n++)
       adval = analogRead(channel);
       sum = sum + adval;
   return(sum / num);

void display_temperature(int T)
    int whole, fract;
    whole = T / 10;  fract = T % 10;
    Serial.print(whole, DEC);
    Serial.println(fract, DEC);
Simple enough?
43  Using Arduino / Programming Questions / Re: Thermistor Readings on: May 02, 2014, 01:10:09 am
Temperature measurements were done with Thermistors successfully for many years prior to integrated devices that automatically return Temperature...
I remember a page from PH Anderson that provides both the math, a table of values and much other useful information for efficient use of thermistors on both the PICAXE and the Arduino... With minor changes nearly any thermistor can be used and are generally much lower in price than many "sensors" (Linear types... LM34 centigrade, LM35 Fahrenheit, TMP36 Deg C, LM335, Deg K),
( Digital types DS18B20, DHT11 / 22 Deg C and RH and a bunch of other digital types as well from National/Ti)
While the analog or digital devices are accurate and easy to use they can be a great deal more expensive than a simple thermistor..
For that matter a silicon diode can also be used... I used a 1N4148 or a PN2907 BE junction for several commercial designs I did about 10 years ago... It did require an Op-Amp and a couple of pots but it was cost effective compared to a thermistor and the support electronics provided 3 point calibration which if carefully applied can be easily 1 - 2% accurate.. I used them (diodes with an analog LCD panel meter IC. an ICL 7105 and a bare LCD display as the 7105 was the LCD controller and A/D conversion circuit too.
I've used all of them at one time or another and found them all most useful...
I don't recommend the Analog types as most except the diode or thermistor generally are 10mV/Deg C and that's a half a bit or 4.8 MV.. The issue is complex but breaks down to the A/D converter not having a separate Analog return so it does have some.. Digital noise issues and the LSB frequently is a throwaway because of the induced digital noise both from the digital ground loops and the lack of real filtering on the AVcc supply.. 100 nF is barely adequate... but you should have no real problems past the LSB bobble...
Perhaps the best part is that there isn't a special library required for the thermistor and it can be assembled for less than a dollar with equal accuracy as the integrated devices... Good education too...

44  Using Arduino / Programming Questions / Re: mega2560 pwm accuracy on: May 01, 2014, 12:22:00 am
Usually incorrect wording means an incorrect understanding of the subject...
That's why books are printed... They have a tendency to correct that oversight.
45  Using Arduino / Programming Questions / Re: I2C Temp Threshold on: May 01, 2014, 12:17:56 am
That condition, not knowing... is usually solved by reading... Not by asking for help that is obvious if you had taken the trouble to find some examples, read them and then do the rest of the work.. read some more until you do understand it...
Pain is the final teacher... If you wish to not experience the pain then you must do the work "Yourself"... once you have done all the research... and read a book or two... then when you get stuck at "See Bobby Run" you just might find that you've already found the answer... Ya Think?
BTW I bought my first Uno in 2012 and I've posted 3 questions here since then... I also managed to read 3 C/C++ books in the same time.
Look at my post count...

Pages: 1 2 [3] 4 5 ... 192