Show Posts
Pages: 1 ... 102 103 [104] 105 106 ... 116
1546  Using Arduino / Storage / Re: Storing inc file on: January 18, 2012, 10:23:10 pm
The .txt file does appear to contain the same data as the .inc file.
1986 bytes wouldn't be a problem for PROGMEM as long as you don't have lots of PROGMEM strings and code.

I don't even know, what these sromTable mean.
So why do you need to get them into an Arduino?

1547  Using Arduino / General Electronics / Re: Multibit DAC on: January 18, 2012, 10:11:07 pm
Mathmatically the derivative of a sine is a symmetrical ramp
It's quite a long time since I did calculus but I don't think it's changed that much. The derivative of the sin function is the cosine function and the derivative of cos is -sin.

1548  Using Arduino / Storage / Re: Storing inc file on: January 18, 2012, 08:27:52 pm
I think your best way to get that into the Arduino is to edit the file and convert the table into a set of 8 256-byte arrays which are initialized with hex constants and add the PROGMEM qualifier so that they will fit.
There's a fair bit of editing needs to be done although some of it can be with a search&replace e.g. removing the "db" from each line is easy.
The main ugliness is converting each of the numbers from the form (e.g.) 44h to 0x44.
So, this:
        db     44h,00h,9eh,9eh,dfh,......
is converted to this:
PROGMEM unsigned char sromTable1 = {
and then the same thing for the other 7 tables.

1549  Using Arduino / Sensors / Re: Interrupts with Arduino Pro Mini on: January 18, 2012, 08:11:49 pm
An interrupt service routine needs to do something really quickly and get out again. Your service routines are doing some things which take quite a bit of time.
Try changing your code to do something like this:
volatile int read_BMA = 0;
volatile int read_ITG = 0;
void loop()
  if(read_BMA) {
    xAcc = readY_BMA();                 // read the three accelerations from the sensor, over I2C
    yAcc = -readX_BMA();                // the axis of the BMA have to be adapted to the axis of the ITG !!!
    zAcc = readZ_BMA();
    read_BMA = 0;
  if(read_ITG) {
    xRate = readX_ITG();                // read the three angular rates from the gyro
    yRate = readY_ITG();
    zRate = readZ_ITG();
    read_ITG = 0;

void bmaISR(void) {
  read_BMA = 1;
}        // end BMA ISR

void itgISR(void) {
  read_ITG = 1;
}        // end ITG ISR
The service routines only set a flag. The loop() does nothing until one of the flags is set and then reads the required info.

1550  Using Arduino / Programming Questions / Re: detect falling object with infra red (urgent) on: January 18, 2012, 08:00:28 pm
AND ... what are the "objects" that you actually use?

1551  Using Arduino / Programming Questions / Re: detect falling object with infra red (urgent) on: January 18, 2012, 07:57:31 pm
What are you using for the IR emitters/detectors and how are they connected to the Arduino (in other words - what's the circuit diagram??).

P.S. Next time do your assignment earlier!
1552  Using Arduino / Sensors / Re: Thermistor Problems on: January 18, 2012, 04:01:52 pm
The PDF where most of your work came from says:
For any specific thermistor you will need a fixed resistor [i.e. Rbottom] of nominally equal resistance.
So, you need to know the nominal resistance of the thermistor(s) you are using and then use a resistor of roughly equal value.

1553  Using Arduino / Project Guidance / Re: As fast as an NFL player? on: January 18, 2012, 03:32:29 pm
When you have the laser pointer apart to try to measure its current requirement, remember that although the laser is low power, at close range it is still very bright and could damage your eyesight. It would be best to cover the laser - a couple of layers of electrical tape would do it.

1554  Using Arduino / Sensors / Re: Thermistor Problems on: January 18, 2012, 11:13:00 am
we have come up with the following Steinhart-Hart coefficients: A= -1.531358897e-3, B= 4.353291903e-4, C= -2.488687432e-7.
Which values did you plug into that calculator? I don't get anything like those coefficients.

1555  Using Arduino / Project Guidance / Re: As fast as an NFL player? on: January 18, 2012, 11:02:40 am
That sounds like a fairly large keychain laser. The keychain laser I have uses three 1.5V "button" cells. Anyway, two AAA batteries in series will give 3V. Each Arduino digital pin provides 5V at a maximum of (I think) 40ma so the voltage might be too high for the 3V laser - you might burn it out.
It looks like you will have to provide an external 3V source controlled by a transistor on a digital pin.

1556  Using Arduino / Sensors / Re: How do you interface a camera? on: January 17, 2012, 09:05:37 pm
There are a few things you need to consider.
- Comparing two retinal scans to determine whether they are equal is not a trivial operation and I doubt there's room just for the code - even in an Arduino Mega.
- The images themselves can't be compared when they are JPG compressed. They have to be decompressed into raster images which means that each one will be close to a megabyte. The Mega only has 256kb so a Mini hasn't got a prayer.
- Do you know what the close focus ability of the camera is? If it can't focus close enough to take an image of the retina (from a distance of a few centimetres) then you're out of luck.
- Even if the camera can focus close enough, how are you going to provide enough light that the camera can get a properly exposed image?

Think about it some more.

1557  Using Arduino / General Electronics / Re: RGB LED driver circuit - works but resistor gets hot on: January 17, 2012, 05:30:13 pm
When Q1 is conducting, there are two paths for current to go through R2. One is through R3. The other is through the base-emitter junction of Q2 which only has R2 to limit the current. I think you might need to add a resistor on the base of Q2.

1558  Using Arduino / Project Guidance / Re: Unexpected behavior of a simple design on: January 17, 2012, 12:40:30 pm
Where's the parts list? In particular what is IC6?
Why is there a big black rectangle in the upper left of the diagram?

1559  Using Arduino / Sensors / Re: Thermistor Problems on: January 16, 2012, 05:18:18 pm
The original formula from the PDF file is of the form:
Rt = R * ( Vs / Vo - 1 )
where Vs is the supply voltage at the top of the divider.

So, your formula
Rt = R * ( 1023.0 / (float) Vo - 1.0 )
can't be correct because you've dropped the Vs term.

1560  Using Arduino / Project Guidance / Re: I did a project, but I don't know if this is a good work. [HELP] on: January 16, 2012, 11:04:28 am
Have you even got a circuit diagram?

Pages: 1 ... 102 103 [104] 105 106 ... 116