Show Posts
Pages: 1 ... 77 78 [79] 80 81 ... 206
1171  Using Arduino / General Electronics / Re: Optocoupler driving mostfet on: September 06, 2013, 03:01:23 am
So nobody kept the 470 Ohms R13, I rather read that less current through the opto C-E might even be better to saturate.
So I captured the schematic to show what I understand now.

I assume a brake light is about 12V / 20W , so the FET should switch about 2A.

BTW:What's the advantage of an opto compared to a normal npn transistor, if you have a common GND anyway ?
1172  International / Deutsch / Re: Arduino Software hängt sich auf bei seriellem Auslesen MAC OSX 10.6.8 on: September 06, 2013, 02:35:11 am
jedoch hängt sich die Software immer nach einer gewissen Zeit auf und nix geht mehr.

Welche Software ?
Der Serial Monitor auf dem Mac ? ( was heisst "hängt sich auf" ? )
oder der Leonardo ? ( woran siehst du das ? )
"nix geht mehr" ist keine nachvollziehbare Aussage. Den Stecker ziehen geht immer.

Im Code den du gepostet hast, ist kein Problem, ausser dass dein Leonardo vermutlich pausenlos sendet.

oder einen Wert.

Das sollte bei 9600 Bd kein Problem darstellen, sowas kannst du aber auch leicht ohne RCReceive und die anderen libraries erzeugen
( um den Fehler einzugrenzen ).

Ansonsten frag mal den Erzeuger von RCReceive.h,  makros.h, debug.h
1173  Using Arduino / General Electronics / Re: Optocoupler driving mostfet on: September 05, 2013, 02:44:45 pm
Connect the optoisolator collector to 12V, emitter to the Gate, then a 470 ohm resistor to ground. No need to involve 5V on that side of the optoisolator, and more drive is fine on a MOSFET.

This applies to the schematic in the first post. Sounds convincing, especially the fact that MOSFET should be off while Arduino output is high impedance ( off / reset )

As amplification If/Ic is not that high for optocouplers, wouldn't a bigger resistor from emitter/gate to GND be more appropriate ( 1k ? or even more ? )
Limit is rather that on If = 0 the gate is still/drops quickly to GND level, isn't it ?
1174  Using Arduino / Programming Questions / Re: Arduino error: does not name a type? on: September 05, 2013, 11:24:43 am
You can't do this.
... unless you learn how others do this

while (!Serial) ; // wait until ready

or similar smiley-wink
1175  Using Arduino / Programming Questions / Re: error msg in serial communication on: September 05, 2013, 11:21:32 am
I think you should give clearer hints, AWOL:

Bootloader refuses to upload everything to a young Arduino.

Guess what causes problems in your sketch:

     tft.print("goto hell");
     tft.print( "!!!!!  ");
     tft.println("procreating PASSWORD");

AWOL thinks it's the second line, I believe. But !!! is hard to google, and you have to know it in advance.,132595.0.html
1176  International / Deutsch / Re: ethernet shield on: September 05, 2013, 10:55:41 am
Wahnsinn, seit wann es schon Ethernet gibt smiley-wink
1177  Using Arduino / Programming Questions / Re: how I can do a library? on: September 05, 2013, 10:33:22 am
... then create separate .h and .cpp files in your project folder and use functions/methods from such .cpp file in your .ino file
That's not a library yet, but you're close smiley-wink

Additionally, there's a tutorial in the playground.
1178  Using Arduino / Programming Questions / Re: Trouble with PROGMEM String on: September 05, 2013, 10:29:43 am
char * p does address RAM not PROGMEM .

Look for prog_char* instead and use pgm_read_byte(p)

1179  Using Arduino / Programming Questions / Re: Error when sending and receiving mesage using Mirf library on: September 05, 2013, 10:18:09 am
String setAddress(String rec) {
while (true) {
 if ( key == 'C' )
    return setAddress(rec);

means for every 'C' without 'D' you go one level deeper in the setAddress() recursion ?

Looks suspicious to me, but didn't analyse completely
( ... because I hate Strings, which look like they could be used like ordinary variables, e.g. returned by value without fear to get a pointer to invalid stack variable.)

@ holmes4: Assumed it's implemented properly, setAddress returns a valid copy of it's local variable add. Guess how many constructors and destructors have to be called to make it work ...
1180  Using Arduino / Programming Questions / Re: Decimal point in an array not recognised on: September 05, 2013, 09:54:13 am
I still see
int channel;
1181  Using Arduino / Programming Questions / Re: Trouble with interrupt not detecting button press when in a certain loop is call on: September 05, 2013, 09:41:21 am
Do you know of a better way to make it cycle until it is interrupted?

volatile bool fading;

void loop() {
  if (fading) LCD_FADER();
  else {
     // what else ?
     fading = true;

LCD_FADER() should "blinkwithoutdelay" and return immediately.
You don't even need an ISR at all.
1182  Using Arduino / Programming Questions / Re: Decimal point in an array not recognised on: September 05, 2013, 09:31:03 am
@PaulS: Ther are other compilers for languages rather similar to c, which even guess an
 if( x = 1) {   }
might not really be what the programmer meant.
Similar for
 int i = 100000;

But regarding atrocious or cruel:
Don't humanize computers, they hate that
also applies to compiler software.

@ Hackdub:
Some prefer to see the whole code.
I recommend you setup a small sample, exposing your problem. ( Perhaps you see the issue yourself, then )

BTW: float or double does not make a difference

1183  Using Arduino / Programming Questions / Re: Write to SDcard function question on: September 05, 2013, 09:12:04 am
Watch the subtle difference between a character and a char .

To add to PeterH's faster response:
Be happy they use the avrgcc compiler as is, and don't write their own, just to implement it the way they document it.
Documentation is nice, but if in doubt, read the include file.
If still in doubt, reat the source code, it's open.
1184  Using Arduino / Programming Questions / Re: Decimal point in an array not recognised on: September 05, 2013, 09:04:17 am
That's where your decimal fractions went.

C Compilers are evil and cruel: they know want you do wrong but don't tell you.
"No problem for me to convert 98.5 to the next int, here you are, have fun"
My dictionaire calls that "atrocious"
1185  Using Arduino / Programming Questions / Re: error msg in serial communication on: September 05, 2013, 08:59:34 am
The error just before seems to say "no such file or directory"  ...

BTW: you can copy/paste errors as well, no need to make a video of your screen.
Pages: 1 ... 77 78 [79] 80 81 ... 206