Show Posts
Pages: 1 2 [3] 4 5 ... 813
31  Using Arduino / General Electronics / Re: P-channel mosfet practical question: If I pull to Gnd, how do I avoid exceeding? on: August 26, 2014, 11:39:15 am
When you switch to complementary devices (ie NPN <-> PNP or p-channel <-> n-channel)
you simply flip the circuit upside down as the voltages and currents are all reversed.  Simple.
32  Using Arduino / Programming Questions / Re: Trouble with DateTime Library on: August 26, 2014, 11:35:14 am
Put it in sketchbook/libraries/DateTime/DateTime.h and
sketchbook/libraries/DateTime/DateTime.cpp and restart Arduino IDO
33  Using Arduino / Programming Questions / Re: 104 nano seconds on: August 26, 2014, 11:33:32 am
Thanks,  I was trying to do video conversion for my small led screen
Then you need a video conversion chip perhaps?
34  Using Arduino / Programming Questions / Re: Serial.available() returns wrong value. on: August 26, 2014, 11:30:31 am
Serial data arrives ssslllooowwwlllyyy. The Arduino reads it rapidly. Why does the fact that the whole string doesn't arrive all at once surprise you?

I did not realize that arduino does not wait end of string. Thank you wery much! You really helped me - now I read UART manual at least.
Please sorry for my bad English.
The Arduino cannot wait till the end of the string since it knows nothing about
any string.  The serial interface delivers one character after another, potentially forever,
there are no magic delimiters sent out-of-channel to break the stream up.  Due to
USB serial conversion there's no guarantee an intersymbol gap isn't simply an artifact
of the USB drivers.

If you know there's a 9 character string coming, you can elect to do this:
Code:
  if (Serial.available () >= 9)
  {
     // read the string, etc
  }

35  Using Arduino / Programming Questions / Re: unsigned long operations gives unexpected result on: August 26, 2014, 11:25:26 am
Indeed, you should code it like this:

Code:
  y = ya + (x - xa) * (yb - ya) / (xb - xa) ;

What you really want is an implementation of muldiv (which would
give the correct result even if the multiply result was larger than a long
by using a 64 bit intermediate result). 

Code:
  y = ya + muldiv (x-xa, yb-ya, xb-xa) ;

I don't know of a muldiv for Arduino, let along one for longs on Arduino.

36  Using Arduino / Programming Questions / Re: Flash Memory of Arduino Uno on: August 26, 2014, 11:06:16 am
Do you mean the RAM of the PC ?

No, the message:
Quote
Global variables use 2,082 bytes (101%) of dynamic memory, leaving -34 bytes for local variables. Maximum is 2,048 bytes.
Talks about 2k -- this is 6 orders of magnitude smaller than the RAM in a PC!!

The keyword you need to search on is "PROGMEM".
37  Using Arduino / Programming Questions / Re: Can integer values be assigned to I/O prts? on: August 26, 2014, 11:02:28 am
Something like:

Code:
  analogWrite (pin_table [random (4)], random (256)) ;

where pin_table maps 0..3 to 4 PWM pin numbers? 

You consfuse "pin" and "port" - a pin is a single logic signal, a port is a group
of pins controlled by the same internal registers on the microcontroller - the
Arduino functions hide ports from you, you don't need to know about them if
you don't want to.
38  Using Arduino / Programming Questions / Re: 104 nano seconds on: August 26, 2014, 10:56:06 am
Better still tell us what the real problem is, then we can judge if 104ns is relevant
in the first place, and if so what precision is needed.
39  Using Arduino / Programming Questions / Re: Trouble with DateTime Library on: August 26, 2014, 10:52:51 am
Well the compiler isn't finding the library by the look of it.  You
haven't said which DateTime library nor posted your code though, so its guesswork
for now.
40  Using Arduino / General Electronics / Re: Laser Woes on: August 25, 2014, 06:56:51 pm
Keep motor supply wiring well away from sensitive circuitry and use twisted pair for it.
41  Using Arduino / General Electronics / Re: P-channel mosfet practical question: If I pull to Gnd, how do I avoid exceeding? on: August 25, 2014, 06:55:58 pm
You can use a 10V zener and 10k between gate and source, then a 2k2 or something
about that value between driver transistor's collector and the p-FET's gate.  The zener
allows the circuit to tolerate much more supply variation than a simple resistive
divider would.  The zener importantly protects the gate from capacitive coupled
spikes from the drain - more important as the supply voltage gets larger.

Because of the high impedances on the gate, don't try to use high speed PWM on such
a setup, 1kHz is probably OK though.
42  Products / Arduino Due / Re: Arduino Due interfacing with 2x DS18B20 on: August 25, 2014, 12:18:40 pm
Hi,

I need to connect 2x DS18B20 temperature sensors to 2 different pins on Arduino Due (pin like D2 and D3).
Due to 3.3v operating voltage of input pins of Arduino Due, how can I operate it? Any information on 1-wire library.
Thanks


The DS18B20 works from 3.0 to 5.5V, fortunately.

I'd check with the sticky thread on Due library porting about the Dallas Temperature
library status.
43  Products / Arduino Due / Re: After removing power, large program won't run until data removed & re-added on: August 25, 2014, 12:11:28 pm
You may have an uninitialized variable, which would cause random symptoms.
44  Products / Arduino Due / Re: Arduino Due + TFT LCD on: August 25, 2014, 12:07:06 pm
Can you provide some information on this TFT screen like a datasheet?
What chip does it use?  Parallel or SPI?
45  Products / Arduino Due / Re: How to store Data fast in RAM on: August 25, 2014, 12:05:19 pm
The chip does have DMA controller, so it ought to be possible to write data to a
large RAM buffer in hardware, permitting an SDcard solution on the Duet board
perhaps?
Pages: 1 2 [3] 4 5 ... 813