Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Displays / Re: LCD contrast not working on: February 24, 2012, 06:48:09 am
JHD16A it is working with arduino duemilanove.
Please check:
 1 (VSS)    GND Arduino pin*
 2 (VDD)    + 5v Arduino pin
 3 (contrast)    Resistor(2K) to GND Arduino pin*  pin13|---/\/\/\/-------ArduinoGND
 4 RS                    Arduino pin 12
 5 R/W            Arduino pin 11
 6 Enable            Arduino pin 10
 7 No connection   
 8 No connection   
 9 No connection   
 10 No connection   
 11 Data 4            Arduino pin 5
 12 Data 5            Arduino pin 4
 13 Data 6            Arduino pin 3
 14 Data 7            Arduino pin 2
 15 Backlight      + 5v Arduino pin
 16 Backlight GND GND Arduino pin*
2  Using Arduino / Programming Questions / Re: Help with Strings and Extracting Data. on: February 24, 2012, 12:10:15 am
If you need  the plain code, try this:

Code:
//*buffer="AT+CSQ: 12,0" expected  buffer format
// return battery voltage level
int getVoltageLevStrtok(char *buffer)
{ char *tmpBuf;
 
   tmpBuf=strtok(buffer,": ");
   tmpBuf=strtok(NULL,",");
   return( atoi(tmpBuf));
 }

3  Using Arduino / Programming Questions / Re: Help with Strings and Extracting Data. on: February 23, 2012, 02:43:05 am
Code:

//*buffer="AT+CSQ: 12,0" expected  buufer format
// return -1  when any error 
// non zero is voltage level
int getVoltageLev(char *buffer)
{ char *tmpBuf;
  char *cpt;
  char *cpt2;
  tmpBuf=malloc(strlen(buffer)+1);
  if(tmpBuf) //allocated the buffer
  {       strcpy( tmpBuf,buffer); //copy required because  this buffer manipulation to be required
          cpt=strstr(tmpBuf,": ");
          if(cpt!=NULL) //cpt= ": 12,0"
          { cpt+=2;     //cpt= "12,0"
            cpt2=cpt;   //cpt2= "12,0"
            cpt2=strstr(cpt2,",");//cpt2= ",0"
             if(cpt2!=NULL)
             { *cpt2='\0';  //cpt2= ",0" <--------Replace , with string terminator
                            //cpt=12
               //LcdStringCopy(0,12,cpt,3);
               return(atoi(cpt)); //return the parse value
               
             }
          }
      free(tmpBuf);
   }
      return -1; //Invalid value or Error
}


I have tested the simillar function for AT+CBC for charge level,  this module for AT+CSQ
4  Using Arduino / Programming Questions / Re: char msg[] versus const char text[] on: February 23, 2012, 12:18:45 am
Code:
HT1632.drawText((const char *)msg[z], x, y, FONT_5X7, FONT_5X7_WIDTH, FONT_5X7_HEIGHT, FONT_5X7_STEP_GLYPH);
  //msg[z] <--------------------- Is  hold a Value not the address
 //(const char *)msg[z]  <--------------- you are converting  a value to address
// (const char *)&msg[z] <--------------- correct syntax you are converting the address to a   (const char *)
5  Using Arduino / Programming Questions / Re: char msg[] versus const char text[] on: February 22, 2012, 06:20:56 am
Function prototype is :
Code:
void drawText(const char [], int x, int y, const char font [], const char font_width [], char font_height, int font_glyph_step, char gutter_space = 1);

HT1632.drawText(val, x, y, FONT_5X7, FONT_5X7_W, FONT_5X7_H, FONT_5X7_STEP);
I have Tested (val, x, y,------------> do not have syntax error
can you check the types or constants in header files HT1632.h
 FONT_5X7, FONT_5X7_W, FONT_5X7_H, FONT_5X7_STEP

6  Using Arduino / Interfacing w/ Software on the Computer / Re: Capturing data from the serial monitor on: February 22, 2012, 02:18:33 am
In window
Hyperterminal-->Transfer---->capture text
7  Using Arduino / Programming Questions / Re: GSM based Home AUTOMATION? on: February 18, 2012, 12:59:54 pm
This is the GSM control system for Alarm and home sensor system.
Sensor output can redirect to various output port (user configurable):
BUZZER
SIREN
SMS
USB
LED/LCD
Internet
IOutput port
Timer-

8  Using Arduino / Programming Questions / Re: An Issue with interrupts on: February 17, 2012, 03:06:33 am
can you plot the debounce time with counts ..
9  Using Arduino / Programming Questions / Re: An Issue with interrupts on: February 17, 2012, 02:58:46 am
First check your Input is changing state or not through this code
Code:
//##################### TEST INPUT PIN2 #########################
void setup() {
  Serial.begin(9600);
  pinMode(2, INPUT);
}

void loop() {
  int sensorValue = digitalRead(2);
  Serial.println(sensorValue, DEC);
}



//##################### TEST INPUT PIN3 #########################
void setup() {
  Serial.begin(9600);
  pinMode(3, INPUT);
}

void loop() {
  int sensorValue = digitalRead(3);
  Serial.println(sensorValue, DEC);
}

10  Using Arduino / Networking, Protocols, and Devices / GSM Alarm and Home sensor system on: February 17, 2012, 12:20:46 am
This is the GSM control system for Alarm and home sensor system.
Sensor output can redirect to various output port (user configurable):
BUZZER
SIREN
SMS
USB
LED/LCD
Internet
IOutput port
Timer-

11  Using Arduino / Programming Questions / Re: Coping an array. on: February 09, 2012, 09:01:12 am
In a loop:-
Code:
for(i=0;i<9;i++)
   ledEbeneOben[i] = ledEbeneOben_buffer[i];
12  Using Arduino / General Electronics / Re: Atmega328 powered by 3.7v lipo on: February 09, 2012, 08:20:52 am
Check this might help you
http://ladyada.net/products/usbdcsolarlipo/index.html
13  Using Arduino / Networking, Protocols, and Devices / Re: Interfacing with garage door remote on: February 09, 2012, 07:23:38 am
The link is:
http://hkdaylightrf.en.alibaba.com
Code:


//Arduino PIN     DL-R02EF PIN  DESCRIPTION
//      2<-----------> VT             for interrupt pin
//      7<----------->D3
//      8<----------->D2
//      9<----------->D1
//     10<---------->D0
int pbIn = 0;                  // Interrupt 0 is on DIGITAL PIN 2!
int addr0=0;
int addr1=0;
int addr2=0;
int addr3=0;
int d7=0,d8=0,d9=0,d10=0;
int rfZone;
void setup() {
  // attachInterrupt(pbIn, stateChange, CHANGE); interrupt
   attachInterrupt(pbIn, stateChange, RISING );
  
  pinMode(13, OUTPUT); //13 pin is using for test purpose
  pinMode(7, INPUT);
  pinMode(8, INPUT);
  pinMode(9, INPUT);
  pinMode(10, INPUT);
  delay(10);
  addr0=digitalRead(7);   // <=d3  RF data decoder pin
  addr1=digitalRead(8);   // <=d2  RF data decoder pin
  addr2=digitalRead(9);   // <=d1  RF data decoder pin
  addr3=digitalRead(10); // <=d0  RF data decoder pin
   rfZone=-1;                 //  Due to M4 latch
  digitalWrite(13, LOW);    // set the LED off
}
void loop() {
  
  int rfVal;
  while(true)
  {
     if( rfZone >=0 ) //SOME RF INTERRUPT HAS BEEN TRIGGERED...
     {   rfVal=rfZone;
         rfZone=-1;
        // ----------------------RECEIVING THE RF  WHEN LED BLINK------------------------------
         digitalWrite(13, HIGH);   //  set the LED on
         delay(500);                    //  wait for a .5 second
         digitalWrite(13, LOW);    // set the LED off
       //-------------------------------------------------------------------------------------------------
        // Serial.print(rfVal);
        // Serial.println("   TEST");
        // ProcessRFMessage(rfVal);
     }
   }
   delay(100);
}
//Interrupt handler run automatically when any message received from remote key
//Interrupt pin is connected to arduino pin2
//rfZone is -1 when nothing is triggered
//rfZone >=0  when any key is receive from remote
void stateChange()
{
d7=digitalRead(7);   // <=d3  RF data decoder pin
d8=digitalRead(8);   // <=d2  RF data decoder pin
d9=digitalRead(9);   // <=d1  RF data decoder pin
d10=digitalRead(10); // <=d0  RF data decoder pin

addr0=addr0 ^  d7; //digitalRead(7); // <=d3
addr1=addr1 ^  d8;// digitalRead(8); // <==d2
addr2=addr2 ^  d9; // digitalRead(9); // <==d1
addr3=addr3 ^  d10; // digitalRead(10);// <==d0

addr2=addr2 << 1;
addr1=addr1 << 2;
addr0=addr0 << 3;
rfZone=(addr3 | addr2 | addr1 | addr0)-1;
addr0=d7;      // digitalRead(7); // <=d3
addr1=d8;      // digitalRead(8); // <==d2
addr2=d9;      // digitalRead(9); // <==d1
addr3=d10;     // digitalRead(10);// <==d0

}
14  Using Arduino / Networking, Protocols, and Devices / Re: Interfacing with garage door remote on: February 09, 2012, 02:51:53 am
Use PT2272 receiver decoder with RF, easily available on alibaba. I am using Model No.: DL-R02EF (http://www.hkdaylightrf.com) for other purpose, you can easily interface with your remote.
15  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino to VB6 Communication Not Functioning as Expected on: February 08, 2012, 12:02:35 pm
Atleast set these parameter in your comm object, most parameter  can set in design time:
Code:
inputMode=1 'comInputModeBinary ; why you can set text aswell as special character.
NullDiscard=true
RThreshold=1
RTSEnable=true
settings=9600,n,8,1 ' baud as your choice
commport=x 'x= your port ID
SThreshold=1
Pages: [1] 2 3 4