Show Posts
Pages: 1 ... 9 10 [11] 12 13
151  Using Arduino / Programming Questions / Re: Problem with reading voltages and possible code faults. on: November 16, 2012, 12:08:43 am
Code:
void setup() {

  pinMode(0, OUTPUT);
  pinMode(1, OUTPUT);
  delay(3000);

  val = analogRead(2);
  delay(500);
  val1 = analogRead(2);
 
  addfloat = val + val1;
 
  finalval = addfloat / 2;

  if (finalval >= 700) {
    buzz = 591;
    cut = 570;
  }
  else if ( finalval >= 450) {
    buzz = 398;
    cut = 367;
  }
}

setup() execute only one time
Code:

val = analogRead(2);
delay(500);
val1 = analogRead(2);
What is the status of your battery when you run this first time? it would be nice if you post all calculations with little detail smiley-wink

Code:
val = analogRead(2);
delay(300);
val1 = analogRead(2);
delay(300);
val2 = analogRead(2);
delay(300);
val3 = analogRead(2);

val = val1 = val2 = val3 most probably why?

152  Using Arduino / Programming Questions / Re: TVout coding question on: November 15, 2012, 11:50:24 pm
Code:
My issue is simple, but for the life of me, ran into a mental block to think of the correct code to fix it.
I want each page to remain until the next or prev buttons are pressed. I have an issue where the page texts displaying on the TVout are not waiting to see prev or next button press, so after about 3 seconds, the screen is unreadable, as its jumbling up all the pages onto one screen.

I tried TVclear_screen, but it posed no affect.
FYI: there is no problem from the LCD doing this. Its only affecting the monitor output.

Boy post full information (Code) and this very limited info. What i find to check condition on pagenumber use "if elseif elseif else" statements.
153  Using Arduino / Programming Questions / Re: RFID Question on: November 15, 2012, 11:36:21 pm
Code:
if(Serial.available())
  {
    //clearRFID();      No need to execute this funtion two time
       
    int index = 0;
    while(Serial.available())
    {
      rfidArray[index] = Serial.read();
      index++;
    }
    Serial.println(rfidArray);
   
    clearRFID();
  }

Congrats on your output Enjoy
154  Using Arduino / Programming Questions / Re: Adjust LCD/LED brightness by reading from an LED on: November 15, 2012, 08:07:14 am
Code:
ADCSRA |= (1<<ADSC); //Turn back on the ADC
To start the ADC measurements, the ADSC bit in ADCSRA needs to be set

Code:
unsigned char adc_reading = ADCH;
ADC has a resolution of 10 bits, this 10 bit value is split across two 8 bit registers, ADCH and ADCL. The highest 8 bits of the measurement in the ADCH register, with the rest in the ADCL register.

Code:
PORTB = PORTB & ~(1<<DAC_CS);
Code:
PORTB = PORTB | (1<<DAC_CS);  
Chip Selection signal for DAC

Code:
WriteByteSPI(0b011110000);
WriteByteSPI(0x00);

To send data on DAC

for more infohttp://www.avrfreaks.net/
155  Using Arduino / Programming Questions / Re: web server and udpntp client at the same time on: November 15, 2012, 06:47:58 am
Quote
Lots of improvements to the ethernet interface classes in 1.0.0, 1.0.1, and 1.0.2. Perhaps it's time to upgrade.

Asking questions in a programming forum without posting code is like going to a car dealer looking for a bus schedule.

I agree with you PaulS
156  Using Arduino / Programming Questions / Re: Reading NMEA data from a serial port. on: November 15, 2012, 06:45:17 am
Quote
My SMS application also stores up to 20 unsent SMS when in poor reception areas, which bumps up memory usage quite dramatically.

Long ago we use "DGS 100 3G Module" unsent SMS stored in SIM and by viewing the status of message you will re-send them OR your message center will attempt to re-send the message at a later time. smiley-cool



157  Using Arduino / Programming Questions / Re: Reading NMEA data from a serial port. on: November 15, 2012, 05:34:38 am
Quote
Most of my projects seem to end up running low on memory, so I try to be memory efficient from the start. This particular project also involves sending and receiving SMSs which also involve storing long strings so I've got an extra need for prudence.

124K Flash
8 KB SRAM

Use FLash for "sending and receiving SMSs"  Like
Code:
FLASH_STRING(big_string, TASK 1, TASK 2, TASK 3...)

I think this will solve your problem of Extra usage "memory for 128 characters".  8 KB SRAM enough for project like that if you use intelligently memory. smiley-cool

cheers

158  Using Arduino / Programming Questions / Re: Reading NMEA data from a serial port. on: November 15, 2012, 04:42:36 am
Quote
This requires allocating a lot of memory to store the characters of the sentence as they arrive.

Did you need Memory Efficient solution,why?   
159  Using Arduino / Project Guidance / Re: Labview and Sketch at same time ? on: November 15, 2012, 04:24:29 am
I don't understand you problem. Probably you are asking for interfacing tutorial
http://digital.ni.com/public.nsf/allkb/8C07747189606D148625789C005C2DD6
160  Using Arduino / Programming Questions / Re: Communication problem with GSM/GPRS-shield on: November 15, 2012, 03:00:39 am
Follow reply#4
may solve your problem
161  Using Arduino / Programming Questions / Re: RFID Question on: November 15, 2012, 02:56:47 am
take snapshot of your result and post without this it is really difficult
162  Using Arduino / Project Guidance / Re: 12 mips CODEC on Arduino ? on: November 15, 2012, 01:23:00 am
Go for the dsPIC versions
163  Using Arduino / Project Guidance / Re: Want to use a tablet to control all the controls in my car. on: November 15, 2012, 01:19:44 am
Quote
With the only exception being the temperature control, the existing control pulls a wire that open and shuts a shutter to swap between cold & hot. But I was toying with the idea of using an acuator like an automatic locking acuator, and setting the time it's on and off. Unless somebody has a better idea?

I haven't good experience about cars but i want to share some of things

Automation of windscreen wipers(by viewing weather), Automation of front light(by viewing Sunlight,  Tyre Air Pressure Readings.

All of those things possible by using can bus and One important point watch this movie "Flash Of Genius"
164  Using Arduino / Programming Questions / Re: Flash.h on: November 15, 2012, 12:37:52 am
Code:
#include <Flash.h>

FLASH_STRING_ARRAY(myArray, "Hello", "World");

void setup() {
}
void loop() {
}

Try this
165  Using Arduino / Programming Questions / Re: RFID Question on: November 14, 2012, 10:46:51 pm
Code:

int index = 0;
char rfidArray[15];
void loop()
{
  if(Serial.available())
  {
    index = 0;
    while(Serial.available())
    {
      rfidArray[index] = Serial.read();
      index++;
    }
    Serial.println(rfidArray);
  }
  for(int x = 0 ; x < 15 ; x++)
    {
      rfidArray[x] = 0;
    }
}
Pages: 1 ... 9 10 [11] 12 13